From 4cd25093a4faee17c26d97c1dc6a0f6e16e6bb44 Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 22 Sep 2021 19:24:39 +0000 Subject: [PATCH] We can't do a command async if there are monitors because we need the lock Former-commit-id: c5b6ade51251a3f57b69d1f3d9c22b199ec00a69 --- src/networking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.cpp b/src/networking.cpp index 7a28697d3..b25eeaf71 100644 --- a/src/networking.cpp +++ b/src/networking.cpp @@ -2712,7 +2712,7 @@ void readQueryFromClient(connection *conn) { if (cserver.cthreads > 1) { parseClientCommandBuffer(c); - if (g_pserver->enable_async_commands && (aeLockContention() || g_fTestMode)) + if (g_pserver->enable_async_commands && listLength(g_pserver->monitors) == 0 && (aeLockContention() || g_fTestMode)) processInputBuffer(c, false, CMD_CALL_SLOWLOG | CMD_CALL_STATS | CMD_CALL_ASYNC); if (!c->vecqueuedcmd.empty()) serverTL->vecclientsProcess.push_back(c);