From 9cc88a7c00fd5b80d19e95099d0079cdc4260406 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 4 Jul 2019 15:11:23 +0200 Subject: [PATCH] src/client/http_client.rs - finish: hold reference to avoid early connection close --- src/client/http_client.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 4ece9007..241f238e 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -554,11 +554,11 @@ impl BackupClient { } pub fn finish(self: Arc) -> impl Future { - 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) {