diff --git a/src/server.c b/src/server.c index 951dd387cf..059e4c7028 100644 --- a/src/server.c +++ b/src/server.c @@ -1658,7 +1658,7 @@ void beforeSleep(struct aeEventLoop *eventLoop) { /* Run a fast expire cycle (the called function will return * ASAP if a fast cycle is not needed). */ - if (server.active_expire_enabled && server.masterhost == NULL) + if (server.active_expire_enabled && iAmMaster()) activeExpireCycle(ACTIVE_EXPIRE_CYCLE_FAST); /* Unblock all the clients blocked for synchronous replication