Skip to content

Commit

Permalink
Fix race condition in rdb client free
Browse files Browse the repository at this point in the history
Signed-off-by: Ubuntu <[email protected]>
  • Loading branch information
Ubuntu committed Jul 23, 2024
1 parent c75d2dd commit 7cd8c5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -4332,9 +4332,9 @@ int closeClientOnOutputBufferLimitReached(client *c, int async) {
if (checkClientOutputBufferLimits(c)) {
sds client = catClientInfoString(sdsempty(), c);
/* Remove RDB connection protection on COB overrun */
c->flag.protected_rdb_channel = 0;

if (async) {
if (async || c->flag.protected_rdb_channel) {
c->flag.protected_rdb_channel = 0;
freeClientAsync(c);
serverLog(LL_WARNING, "Client %s scheduled to be closed ASAP for overcoming of output buffer limits.",
client);
Expand Down

0 comments on commit 7cd8c5e

Please sign in to comment.