src/client/http_client.rs - finish: hold reference to avoid early connection close
This commit is contained in:
parent
5e04ec707d
commit
9cc88a7c00
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user