From 48ba6c173c8bbe452d63a5cb907b322afc2ebe4d Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 26 Feb 2020 21:49:40 -0500 Subject: [PATCH] Fix crash propogating stale keys Former-commit-id: d95bead3837edeca11f27f6f344eca8174ca53e3 --- src/replication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/replication.cpp b/src/replication.cpp index ba2008c0a..d7e92d308 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -278,7 +278,7 @@ void replicationFeedSlave(client *replica, int dictid, robj **argv, int argc, bo if (g_pserver->repl_backlog && fSendRaw) feedReplicationBacklogWithObject(selectcmd); /* Send it to slaves */ - addReply(replica,selectcmd); + addReplyAsync(replica,selectcmd); if (dictid < 0 || dictid >= PROTO_SHARED_SELECT_CMDS) decrRefCount(selectcmd); @@ -290,12 +290,12 @@ void replicationFeedSlave(client *replica, int dictid, robj **argv, int argc, bo * or are already in sync with the master. */ /* Add the multi bulk length. */ - addReplyArrayLen(replica,argc); + addReplyArrayLenAsync(replica,argc); /* Finally any additional argument that was not stored inside the * static buffer if any (from j to argc). */ for (int j = 0; j < argc; j++) - addReplyBulk(replica,argv[j]); + addReplyBulkAsync(replica,argv[j]); } /* Propagate write commands to slaves, and populate the replication backlog