From: antirez Date: Thu, 16 Feb 2012 11:20:56 +0000 (+0100) Subject: Return ASAP from checkClientOutputBufferLimits() if c->reply_bytes is zero. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/6e09ad1c156f10246ccd0f2de5b11a9635e28818?ds=sidebyside Return ASAP from checkClientOutputBufferLimits() if c->reply_bytes is zero. --- diff --git a/src/networking.c b/src/networking.c index dab6bfd9..d8fb8132 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1329,7 +1329,7 @@ int checkClientOutputBufferLimits(redisClient *c) { * called from contexts where the client can't be freed safely, i.e. from the * lower level functions pushing data inside the client output buffers. */ void asyncCloseClientOnOutputBufferLimitReached(redisClient *c) { - if (c->flags & REDIS_CLOSE_ASAP) return; + if (c->reply_bytes == 0 || c->flags & REDIS_CLOSE_ASAP) return; if (checkClientOutputBufferLimits(c)) { sds client = getClientInfoString(c);