[pbs-devel] [PATCH proxmox-backup 09/12] tokio 1.0: update to new Signal interface

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Jan 12 14:58:23 CET 2021


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 at proxmox.com>
---
 src/bin/proxmox_backup_client/mount.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/proxmox_backup_client/mount.rs b/src/bin/proxmox_backup_client/mount.rs
index 6a22f78b..204ed7fc 100644
--- a/src/bin/proxmox_backup_client/mount.rs
+++ b/src/bin/proxmox_backup_client/mount.rs
@@ -246,7 +246,8 @@ async fn mount_do(param: Value, pipe: Option<Fd>) -> Result<Value, Error> {
     // handle SIGINT and SIGTERM
     let mut interrupt_int = signal(SignalKind::interrupt())?;
     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") {
         let index = client.download_dynamic_index(&manifest, &server_archive_name).await?;
-- 
2.20.1






More information about the pbs-devel mailing list