From 1a54d5963e8c50ed90dbcc72b55e01d91589ea2f Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 30 May 2013 12:13:25 +0200 Subject: [PATCH] Refresh good slaves count when setting slave state as online. --- src/replication.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/replication.c b/src/replication.c index 93740058..fa0eb2b7 100644 --- a/src/replication.c +++ b/src/replication.c @@ -441,6 +441,7 @@ int masterTryPartialResynchronization(redisClient *c) { * to -1 to force the master to emit SELECT, since the slave already * has this state from the previous connection with the master. */ + refreshGoodSlavesCount(); return REDIS_OK; /* The caller can return, no full resync needed. */ need_full_resync: @@ -662,6 +663,7 @@ void sendBulkToSlave(aeEventLoop *el, int fd, void *privdata, int mask) { freeClient(slave); return; } + refreshGoodSlavesCount(); redisLog(REDIS_NOTICE,"Synchronization with slave succeeded"); } }