X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/1043c8064bce1ffaaa89c9358889bf0ea0b33f51..c9edd1b28ae429e6c34462917fcb5c9d616e0ef8:/src/replication.c diff --git a/src/replication.c b/src/replication.c index 170bee73..c99be32a 100644 --- a/src/replication.c +++ b/src/replication.c @@ -541,6 +541,7 @@ void slaveofCommand(redisClient *c) { server.masterhost = sdsdup(c->argv[1]->ptr); server.masterport = port; if (server.master) freeClient(server.master); + disconnectSlaves(); /* Force our slaves to resync with us as well. */ if (server.repl_state == REDIS_REPL_TRANSFER) replicationAbortSyncTransfer(); server.repl_state = REDIS_REPL_CONNECT;