small consistency fixes

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
ゆめ 2024-11-22 13:47:42 -06:00
parent d2001e8e4b
commit ac1f17d84e
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View file

@ -822,7 +822,7 @@ pub struct App<C: UpstreamClient, S: Sandboxing> {
pub fn register_cancel_handler() { pub fn register_cancel_handler() {
#[cfg(target_family = "unix")] #[cfg(target_family = "unix")]
unsafe { unsafe {
unsafe fn cancel_handler(_: libc::c_int) { unsafe extern "C" fn cancel_handler(_: libc::c_int) {
log::error!("Received cancel signal, stopping thread"); log::error!("Received cancel signal, stopping thread");
libc::pthread_exit(&sandbox::EXIT_TIMEOUT as *const _ as *mut _); libc::pthread_exit(&sandbox::EXIT_TIMEOUT as *const _ as *mut _);
} }

View file

@ -241,6 +241,7 @@ fn main() {
return; return;
} }
#[cfg(feature = "metrics")]
{ {
let reg = prometheus::default_registry(); let reg = prometheus::default_registry();