Ping the slave using the standard protocol instead of the inline one.

This commit is contained in:
antirez 2012-02-29 16:33:54 +01:00
parent c1db214eeb
commit a950a84303

View File

@ -596,7 +596,7 @@ void replicationCron(void) {
if (slave->replstate == REDIS_REPL_SEND_BULK) continue; if (slave->replstate == REDIS_REPL_SEND_BULK) continue;
if (slave->replstate == REDIS_REPL_ONLINE) { if (slave->replstate == REDIS_REPL_ONLINE) {
/* If the slave is online send a normal ping */ /* If the slave is online send a normal ping */
addReplySds(slave,sdsnew("PING\r\n")); addReplySds(slave,sdsnew("*1\r\n$4\r\nPING\r\n"));
} else { } else {
/* Otherwise we are in the pre-synchronization stage. /* Otherwise we are in the pre-synchronization stage.
* Just a newline will do the work of refreshing the * Just a newline will do the work of refreshing the