Revert "Wait: wait without callback, otherwise there will be use-after-dtor."

This reverts commit 7b16ce6770.

That patch is invalid.
This commit is contained in:
Tao He 2021-04-28 17:36:20 +08:00
parent 7b16ce6770
commit bb22ef4d7f
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ void etcd::Watcher::Wait(std::function<void(bool)> callback)
currentTask.then([this, callback](pplx::task<void> const & resp_task) { currentTask.then([this, callback](pplx::task<void> const & resp_task) {
resp_task.wait(); resp_task.wait();
callback(this->stubs->call->Cancelled()); callback(this->stubs->call->Cancelled());
}).wait(); });
} }
void etcd::Watcher::Cancel() void etcd::Watcher::Cancel()