mirror of https://github.com/fafhrd91/actix-net
server: Don't listen to SIGHUP
The Server didn't take any action when receiving SIGHUP. However, Signals would return Poll::Ready, which would cause the Server to miss any other signal after that This is probably better than just quitting on SIGHUP, because it's common to repurpose it for something other than quitting
This commit is contained in:
parent
80a362712f
commit
f4edbd1114
|
@ -3,8 +3,13 @@
|
|||
## Unreleased - 2021-xx-xx
|
||||
* Remove `config` module. `ServiceConfig`, `ServiceRuntime` public types are removed due to this change. [#349]
|
||||
* Remove `ServerBuilder::configure` [#349]
|
||||
* Server no long listens to SIGHUP signal.
|
||||
It actually did not take any action when receiving SIGHUP, the only thing SIGHUP did was to stop
|
||||
the Server from receiving any future signal, because the `Signals` future stops on the first
|
||||
signal received [#389]
|
||||
|
||||
[#349]: https://github.com/actix/actix-net/pull/349
|
||||
[#389]: https://github.com/actix/actix-net/pull/389
|
||||
|
||||
|
||||
## 2.0.0-beta.5 - 2021-04-20
|
||||
|
|
|
@ -335,7 +335,6 @@ impl ServerBuilder {
|
|||
completion: None,
|
||||
})
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
ServerCommand::Notify(tx) => {
|
||||
|
|
|
@ -8,8 +8,6 @@ use crate::server::Server;
|
|||
#[allow(dead_code)]
|
||||
#[derive(PartialEq, Clone, Copy, Debug)]
|
||||
pub(crate) enum Signal {
|
||||
/// SIGHUP
|
||||
Hup,
|
||||
/// SIGINT
|
||||
Int,
|
||||
/// SIGTERM
|
||||
|
@ -41,7 +39,6 @@ impl Signals {
|
|||
|
||||
let sig_map = [
|
||||
(unix::SignalKind::interrupt(), Signal::Int),
|
||||
(unix::SignalKind::hangup(), Signal::Hup),
|
||||
(unix::SignalKind::terminate(), Signal::Term),
|
||||
(unix::SignalKind::quit(), Signal::Quit),
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue