sentinel: fix randomized sentinelTimer.

This commit is contained in:
youjiali1995 2018-09-05 10:32:18 +08:00
parent 4e5e0d3719
commit a8322f44b3

View File

@ -1320,9 +1320,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
}
/* Run the Sentinel timer if we are in sentinel mode. */
run_with_period(100) {
if (server.sentinel_mode) sentinelTimer();
}
if (server.sentinel_mode) sentinelTimer();
/* Cleanup expired MIGRATE cached sockets. */
run_with_period(1000) {