1.wait for response when connecting to redis

2.remove unused code
3.fix sentinel.conf typing
This commit is contained in:
fortrue 2018-03-26 14:59:20 +08:00
parent 4eda710da4
commit 0891036e8c
2 changed files with 4 additions and 5 deletions

View File

@ -40,9 +40,9 @@
# ServerRetryTimeout 1
# KeepAlive 120
# Sentinels {
# + 10.2.2.2
# + 10.2.2.3
# + 10.2.2.4
# + 10.2.2.2:7500
# + 10.2.2.3:7500
# + 10.2.2.4:7500
# }
# Group shard001 {
# }

View File

@ -53,11 +53,10 @@ ConnectConnection* ConnectConnectionPool::getShareConnection(int db)
c->close(mHandler);
return nullptr;
}
if (mServ->fail() || c->isConnecting()) {
if (mServ->fail()) {
return nullptr;
}
return c;
return mServ->fail() ? nullptr : c;
}
ConnectConnection* ConnectConnectionPool::getPrivateConnection(int db)