Return ASAP from checkClientOutputBufferLimits() if c->reply_bytes is zero.

This commit is contained in:
antirez 2012-02-16 12:20:56 +01:00
parent 48a32944e6
commit 6e09ad1c15

View File

@ -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);