From 9ee99ed19455c434a9910c469e07c820e49aaa66 Mon Sep 17 00:00:00 2001 From: Enrico Giordani Date: Wed, 2 Dec 2015 00:39:58 +0100 Subject: [PATCH] [Fix] Replication I/O bug when AUTH is enabled. --- src/replication.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index 542608e4621..70c8d8a9100 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1557,7 +1557,6 @@ void syncWithMaster(aeEventLoop *el, int fd, void *privdata, int mask) { redisLog(REDIS_NOTICE, "Master replied to PING, replication can continue..."); } - WIN32_ONLY(WSIOCP_QueueNextRead(fd);) sdsfree(err); server.repl_state = REDIS_REPL_SEND_AUTH; } @@ -1568,6 +1567,7 @@ void syncWithMaster(aeEventLoop *el, int fd, void *privdata, int mask) { err = sendSynchronousCommand(SYNC_CMD_WRITE,fd,"AUTH",server.masterauth,NULL); if (err) goto write_error; server.repl_state = REDIS_REPL_RECEIVE_AUTH; + WIN32_ONLY(WSIOCP_QueueNextRead(fd);) return; } else { server.repl_state = REDIS_REPL_SEND_PORT; @@ -1622,6 +1622,7 @@ void syncWithMaster(aeEventLoop *el, int fd, void *privdata, int mask) { if (err) goto write_error; sdsfree(err); server.repl_state = REDIS_REPL_RECEIVE_CAPA; + WIN32_ONLY(WSIOCP_QueueNextRead(fd);) return; }