diff --git a/nginx_module/src/timer.rs b/nginx_module/src/timer.rs index 5cf5417..86f44d5 100644 --- a/nginx_module/src/timer.rs +++ b/nginx_module/src/timer.rs @@ -20,7 +20,10 @@ impl Drop for Timer { } unsafe { - if self.event.timer_set() != 0 { + if self.event.timer_set() != 0 + && ngx_quit == 0 + && ngx_exiting == 0 + && ngx_terminate == 0 { ngx_event_del_timer(&mut *self.event.as_mut()); } }