From 7cdbd48e7a8a0a5c996cfdef33d3e2e21fbdb47d Mon Sep 17 00:00:00 2001 From: John Sully Date: Tue, 25 May 2021 20:51:18 +0000 Subject: [PATCH] Fix failure sending deferred aggregate lengths to clients on other threads (merge bug) Former-commit-id: 915117ae7bac90fe41c7f36d97bcd654d6e90b62 --- src/networking.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/networking.cpp b/src/networking.cpp index 85140547e..6c83ce3d5 100644 --- a/src/networking.cpp +++ b/src/networking.cpp @@ -743,11 +743,10 @@ void setDeferredReply(client *c, void *node, const char *s, size_t length) { void setDeferredAggregateLen(client *c, void *node, long length, char prefix) { serverAssert(length >= 0); - /* Abort when *node is NULL: when the client should not accept writes - * we return NULL in addReplyDeferredLen() */ - if (node == NULL) return; - if (FCorrectThread(c)) { + /* Abort when *node is NULL: when the client should not accept writes + * we return NULL in addReplyDeferredLen() */ + if (node == NULL) return; char lenstr[128]; size_t lenstr_len = sprintf(lenstr, "%c%ld\r\n", prefix, length); setDeferredReply(c, node, lenstr, lenstr_len);