Skip to content

Commit

Permalink
[Fix] Replication I/O bug when AUTH is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
enricogior committed Dec 2, 2015
1 parent b186c27 commit 9ee99ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9ee99ed

Please sign in to comment.