X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/7c39b55d4231f3933d79c690572200bb251f6a0f..f8a19e32e2fffea00e61717d99ecebabafbbe852:/src/sentinel.c?ds=sidebyside diff --git a/src/sentinel.c b/src/sentinel.c index 3acadf83..e89b343a 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -765,6 +765,7 @@ void sentinelResetMaster(sentinelRedisInstance *ri, int flags) { ri->sentinels = dictCreate(&instancesDictType,NULL); if (ri->cc) sentinelKillLink(ri,ri->cc); if (ri->pc) sentinelKillLink(ri,ri->pc); + ri->pending_commands = 0; ri->flags &= SRI_MASTER|SRI_CAN_FAILOVER|SRI_DISCONNECTED; if (ri->leader) { sdsfree(ri->leader); @@ -778,6 +779,8 @@ void sentinelResetMaster(sentinelRedisInstance *ri, int flags) { sdsfree(ri->slave_master_host); ri->runid = NULL; ri->slave_master_host = NULL; + ri->last_avail_time = mstime(); + ri->last_pong_time = mstime(); if (flags & SENTINEL_GENERATE_EVENT) sentinelEvent(REDIS_WARNING,"+reset-master",ri,"%@"); }