Fixes a CAS error in watcher.
Signed-off-by: Tao He <sighingnow@gmail.com>
This commit is contained in:
parent
ad4215511f
commit
b28aca1f82
|
|
@ -97,7 +97,7 @@ etcd::Watcher::~Watcher()
|
|||
|
||||
bool etcd::Watcher::Wait()
|
||||
{
|
||||
if (cancelled.exchange(true)) {
|
||||
if (!cancelled.exchange(true)) {
|
||||
if (task_.joinable()) {
|
||||
task_.join();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue