summaryrefslogtreecommitdiff
path: root/src/replication.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/replication.c')
-rw-r--r--src/replication.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/replication.c b/src/replication.c
index 773d6e704..17a8bb357 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -2214,8 +2214,7 @@ void replicationResurrectCachedMaster(int newfd) {
server.repl_down_since = 0;
/* Re-add to the list of clients. */
- listAddNodeTail(server.clients,server.master);
- server.master->client_list_node = listLast(server.clients);
+ linkClient(server.master);
if (aeCreateFileEvent(server.el, newfd, AE_READABLE,
readQueryFromClient, server.master)) {
serverLog(LL_WARNING,"Error resurrecting the cached master, impossible to add the readable handler: %s", strerror(errno));