From 1036b4b21b0edb8a9075827f7b1d33918b7557a6 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 3 Sep 2013 11:42:09 +0200 Subject: [PATCH] Cluster: use non-blocking I/O for the cluster bus. --- src/cluster.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cluster.c b/src/cluster.c index bc0e34be..8625cee1 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -317,6 +317,10 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { redisLog(REDIS_VERBOSE,"Accepting cluster node: %s", server.neterr); return; } + anetNonBlock(NULL,cfd); + anetEnableTcpNoDelay(NULL,cfd); + + /* Use non-blocking I/O for cluster messages. */ /* IPV6: might want to wrap a v6 address in [] */ redisLog(REDIS_VERBOSE,"Accepted cluster node %s:%d", cip, cport); /* We need to create a temporary node in order to read the incoming