src/client/http_client.rs - finish: hold reference to avoid early connection close

This commit is contained in:
Dietmar Maurer 2019-07-04 15:11:23 +02:00
parent 5e04ec707d
commit 9cc88a7c00

View File

@ -554,11 +554,11 @@ impl BackupClient {
}
pub fn finish(self: Arc<Self>) -> impl Future<Item=(), Error=Error> {
let canceller = self.canceller.clone();
self.h2.clone().post("finish", None).map(move |_| {
canceller.cancel();
()
})
self.h2.clone()
.post("finish", None)
.map(move |_| {
self.canceller.cancel();
})
}
pub fn force_close(self) {