summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYossi Gottlieb <yossigo@gmail.com>2020-03-22 14:46:16 +0200
committerYossi Gottlieb <yossigo@gmail.com>2020-03-22 14:46:16 +0200
commit4c08ae3ff698025b7100648faae5a0ac3f9f31fc (patch)
treecaf7ec2fa4d03a5df16c45c7c19944dacda3d123
parentfa9aa90813ae67509208022f1315cbe82869c2cc (diff)
downloadredis-4c08ae3ff698025b7100648faae5a0ac3f9f31fc.tar.gz
Cluster: fix misleading accept errors.
-rw-r--r--src/cluster.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cluster.c b/src/cluster.c
index 72755823a..a2e9ff5b6 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -681,9 +681,10 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
* or schedule it for later depending on connection implementation.
*/
if (connAccept(conn, clusterConnAcceptHandler) == C_ERR) {
- serverLog(LL_VERBOSE,
- "Error accepting cluster node connection: %s",
- connGetLastError(conn));
+ if (connGetState(conn) == CONN_STATE_ERROR)
+ serverLog(LL_VERBOSE,
+ "Error accepting cluster node connection: %s",
+ connGetLastError(conn));
connClose(conn);
return;
}