mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-26 15:07:43 +02:00
feat: server shutdown signal (#676)
This commit is contained in:
@ -187,10 +187,7 @@ impl SystemRunner {
|
||||
|
||||
match exit_code {
|
||||
0 => Ok(()),
|
||||
nonzero => Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("Non-zero exit code: {}", nonzero),
|
||||
)),
|
||||
nonzero => Err(io::Error::other(format!("Non-zero exit code: {}", nonzero))),
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,8 +196,7 @@ impl SystemRunner {
|
||||
let SystemRunner { rt, stop_rx, .. } = self;
|
||||
|
||||
// run loop
|
||||
rt.block_on(stop_rx)
|
||||
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))
|
||||
rt.block_on(stop_rx).map_err(io::Error::other)
|
||||
}
|
||||
|
||||
/// Retrieves a reference to the underlying [Actix runtime](crate::Runtime) associated with this
|
||||
|
Reference in New Issue
Block a user