Refresh good slaves count when setting slave state as online.

This commit is contained in:
antirez 2013-05-30 12:13:25 +02:00
parent d64d2e21c9
commit 1a54d5963e

View File

@ -441,6 +441,7 @@ int masterTryPartialResynchronization(redisClient *c) {
* to -1 to force the master to emit SELECT, since the slave already * to -1 to force the master to emit SELECT, since the slave already
* has this state from the previous connection with the master. */ * has this state from the previous connection with the master. */
refreshGoodSlavesCount();
return REDIS_OK; /* The caller can return, no full resync needed. */ return REDIS_OK; /* The caller can return, no full resync needed. */
need_full_resync: need_full_resync:
@ -662,6 +663,7 @@ void sendBulkToSlave(aeEventLoop *el, int fd, void *privdata, int mask) {
freeClient(slave); freeClient(slave);
return; return;
} }
refreshGoodSlavesCount();
redisLog(REDIS_NOTICE,"Synchronization with slave succeeded"); redisLog(REDIS_NOTICE,"Synchronization with slave succeeded");
} }
} }