diff --git a/src/windows.rs b/src/windows.rs index d1e5887..c44bfb5 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -244,7 +244,9 @@ unsafe extern "system" fn callback( n if n == MibDeleteInstance => RouteEvent::Delete(route), _ => return, }; - sender.send(event).unwrap(); + if let Err(_) = sender.send(event) { + // If their no receiver, this may indicate that the system is currently shutting down + } } fn code_to_error(code: u32, msg: &str) -> io::Error {