Commit be159490 authored by antirez's avatar antirez
Browse files

Cluster: don't accept cluster bus connections during startup.

parent b8a71e5a
...@@ -502,6 +502,10 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { ...@@ -502,6 +502,10 @@ void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
REDIS_NOTUSED(mask); REDIS_NOTUSED(mask);
REDIS_NOTUSED(privdata); REDIS_NOTUSED(privdata);
/* If the server is starting up, don't accept cluster connections:
* UPDATE messages may interact with the database content. */
if (server.masterhost == NULL && server.loading) return;
while(max--) { while(max--) {
cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport); cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
if (cfd == ANET_ERR) { if (cfd == ANET_ERR) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment