From bb22ef4d7f4267b5a775613d1f75ff36c62cafc3 Mon Sep 17 00:00:00 2001 From: Tao He Date: Wed, 28 Apr 2021 17:36:20 +0800 Subject: [PATCH] Revert "Wait: wait without callback, otherwise there will be use-after-dtor." This reverts commit 7b16ce6770a009a606c56a79b6df4494eafb099b. That patch is invalid. --- src/Watcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Watcher.cpp b/src/Watcher.cpp index e02c873..89b979c 100644 --- a/src/Watcher.cpp +++ b/src/Watcher.cpp @@ -107,7 +107,7 @@ void etcd::Watcher::Wait(std::function callback) currentTask.then([this, callback](pplx::task const & resp_task) { resp_task.wait(); callback(this->stubs->call->Cancelled()); - }).wait(); + }); } void etcd::Watcher::Cancel()