diff --git a/src/server.cpp b/src/server.cpp index 50e41af2c..48b0cf89d 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2401,7 +2401,7 @@ void beforeSleep(struct aeEventLoop *eventLoop) { locker.disarm(); if (!fSentReplies) handleClientsWithPendingWrites(iel, aof_state); - if (moduleCount()) moduleReleaseGIL(TRUE /*fServerThread*/); + moduleReleaseGIL(TRUE /*fServerThread*/); /* Do NOT add anything below moduleReleaseGIL !!! */ } @@ -2414,7 +2414,7 @@ void afterSleep(struct aeEventLoop *eventLoop) { /* Do NOT add anything above moduleAcquireGIL !!! */ /* Aquire the modules GIL so that their threads won't touch anything. */ - if (moduleCount()) moduleAcquireGIL(TRUE /*fServerThread*/); + moduleAcquireGIL(TRUE /*fServerThread*/); } /* =========================== Server initialization ======================== */