diff --git a/src/rdb.c b/src/rdb.c index e2d53fa767c4f04d712616ec9692faaab67426df..c98cd3f7b3e16e06472a013d83592556faa6325f 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -1349,6 +1349,7 @@ void backgroundSaveDoneHandlerSocket(int exitcode, int bysignal) { slave->id); /* Restore the socket as non-blocking. */ anetNonBlock(NULL,slave->fd); + anetSendTimeout(NULL,slave->fd,0); } } } @@ -1414,6 +1415,7 @@ int rdbSaveToSlavesSockets(void) { * We'll restore it when the children returns (since duped socket * will share the O_NONBLOCK attribute with the parent). */ anetBlock(NULL,slave->fd); + anetSendTimeout(NULL,slave->fd,server.repl_timeout*1000); } }