]> git.saurik.com Git - redis.git/blobdiff - src/replication.c
Globals protection global() function modified for speed and correctness.
[redis.git] / src / replication.c
index 170bee73e1e284ad4052f4de1bd22d4d26d28c9c..c99be32aff6c36be1878a06e5e8d83331a4a263f 100644 (file)
@@ -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;