Skip to content

Commit 3884650

Browse files
authored
blocking client followup fix related to log_req_res (#1989)
See #1819 (comment) Verified the fix by: 1. Build: `make SERVER_CFLAGS='-Werror -DLOG_REQ_RES' -j10` 2. Running module api tests: `CFLAGS='-Werror' ./runtest-moduleapi --log-req-res --no-latency --dont-clean --force-resp3 --dont-pre-clean --verbose --dump-logs` --------- Signed-off-by: yairgott <[email protected]>
1 parent 1766416 commit 3884650

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/networking.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,9 @@ void _addReplyToBufferOrList(client *c, const char *s, size_t len) {
489489
}
490490

491491
c->net_output_bytes_curr_cmd += len;
492+
/* We call it here because this function may affect the reply
493+
* buffer offset (see function comment) */
494+
reqresSaveClientReplyOffset(c);
492495

493496
/* If we're processing a push message into the current client (i.e. executing PUBLISH
494497
* to a channel which we are subscribed to, then we wanna postpone that message to be added
@@ -502,9 +505,6 @@ void _addReplyToBufferOrList(client *c, const char *s, size_t len) {
502505
_addReplyProtoToList(c, c->deferred_reply, s, len);
503506
return;
504507
}
505-
/* We call it here because this function may affect the reply
506-
* buffer offset (see function comment) */
507-
reqresSaveClientReplyOffset(c);
508508

509509
if (defer_push_message) {
510510
_addReplyProtoToList(c, server.pending_push_messages, s, len);

0 commit comments

Comments
 (0)