diff --git a/sdk/src/extras/disk.rs b/sdk/src/extras/disk.rs index b7f9ac2d..54c16e20 100644 --- a/sdk/src/extras/disk.rs +++ b/sdk/src/extras/disk.rs @@ -19,6 +19,7 @@ pub mod builder { use crate::{Client, Error}; use std::future::Future; + use std::mem; use std::sync::atomic::{AtomicBool, AtomicU64}; use std::sync::Arc; use tokio::sync::{oneshot, watch}; @@ -107,7 +108,12 @@ pub mod builder { impl Future> + 'a, Error, > { - Ok(self.execute_with_control()?.0) + let (fut, handle) = self.execute_with_control()?; + + // Leak the handle so we don't cancel the request by dropping it. + mem::forget(handle); + + Ok(fut) } /// Return a `Future` for the disk creation and a `DiskImportHandle` which