1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-23 22:56:55 +01:00

Gracefully exit on SIGTERM

This commit is contained in:
Roman Zeyde 2018-08-31 10:39:01 +03:00
parent 74dfef8f09
commit 6a4def0459
No known key found for this signature in database
GPG key ID: 87CAE5FA46917CBB

View file

@ -12,7 +12,7 @@ pub struct Waiter {
impl Waiter {
pub fn new() -> Waiter {
Waiter {
signal: chan_signal::notify(&[chan_signal::Signal::INT]),
signal: chan_signal::notify(&[chan_signal::Signal::INT, chan_signal::Signal::TERM]),
}
}
pub fn wait(&self, duration: Duration) -> Result<()> {