X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/48a32944e6b5e30754701109ff23d85a418d3d4d..dfc25454701638d39bc75fbc3f9c55619b503bd0:/src/networking.c diff --git a/src/networking.c b/src/networking.c index dab6bfd9..40aad836 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1087,11 +1087,7 @@ sds getClientInfoString(redisClient *client) { time_t now = time(NULL); int emask; - if (anetPeerToString(client->fd,ip,&port) == -1) { - ip[0] = '?'; - ip[1] = '\0'; - port = 0; - } + anetPeerToString(client->fd,ip,&port); p = flags; if (client->flags & REDIS_SLAVE) { if (client->flags & REDIS_MONITOR) @@ -1329,7 +1325,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);