Merge pull request #449 from holmes1412/master

fix upstream_replace_server
This commit is contained in:
xiehan
2021-07-06 17:31:59 +08:00
committed by GitHub

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;
}