Skip to content

Commit 193ad00

Browse files
committed
allow to check failed ip
1 parent 2e37b72 commit 193ad00

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

connection/connectionPool.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,9 @@ bool ConnectionPool::checkExistIp(const std::string& ip) const {
240240
if (conns_.empty()) return false;
241241
int N = conns_.size();
242242
for (int i = 0; i < N; ++i) {
243-
if (conns_[i]->isSocketValid()) {
244-
std::string ipStr = conns_[i]->getNodeIp();
245-
if (ipStr == ip) {
246-
return true;
247-
}
243+
std::string ipStr = conns_[i]->getNodeIp();
244+
if (ipStr == ip) {
245+
return true;
248246
}
249247
}
250248
return false;

0 commit comments

Comments
 (0)