tokio 1.0: update to new Signal interface

Signal does not yet re-implement Stream (and is not yet wrapped in
tokio-stream either).

see https://github.com/tokio-rs/tokio/pull/3383

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2021-01-11 09:52:52 +01:00
parent 0f860f712f
commit b5a202acb6

View File

@ -246,7 +246,8 @@ async fn mount_do(param: Value, pipe: Option<Fd>) -> Result<Value, Error> {
// handle SIGINT and SIGTERM // handle SIGINT and SIGTERM
let mut interrupt_int = signal(SignalKind::interrupt())?; let mut interrupt_int = signal(SignalKind::interrupt())?;
let mut interrupt_term = signal(SignalKind::terminate())?; let mut interrupt_term = signal(SignalKind::terminate())?;
let mut interrupt = futures::future::select(interrupt_int.next(), interrupt_term.next());
let mut interrupt = futures::future::select(interrupt_int.recv().boxed(), interrupt_term.recv().boxed());
if server_archive_name.ends_with(".didx") { if server_archive_name.ends_with(".didx") {
let index = client.download_dynamic_index(&manifest, &server_archive_name).await?; let index = client.download_dynamic_index(&manifest, &server_archive_name).await?;