fix upstream_replace_server

This commit is contained in:
holmes1412
2021-07-06 17:21:34 +08:00
parent a6bb61d1c6
commit 7e985dd79c

View File

@@ -154,8 +154,8 @@ int UPSGroupPolicy::replace_server(const std::string& address,
new UPSAddrParams(params, address));
pthread_rwlock_wrlock(&this->rwlock);
this->add_server_locked(addr);
ret = this->remove_server_locked(address);
this->add_server_locked(addr);
pthread_rwlock_unlock(&this->rwlock);
return ret;
}