diff --git a/src/networking.c b/src/networking.c index 82c763c95fbaa62f4c07140943e3b46213a1e3db..00f5bab027e49f65c8be3da1b19fd640a2953a5b 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1944,6 +1944,7 @@ int checkClientOutputBufferLimits(client *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(client *c) { + if (c->fd == -1) return; /* It is unsafe to free fake clients. */ serverAssert(c->reply_bytes < SIZE_MAX-(1024*64)); if (c->reply_bytes == 0 || c->flags & CLIENT_CLOSE_ASAP) return; if (checkClientOutputBufferLimits(c)) {