mirror of
https://github.com/fluencelabs/redis
synced 2025-06-19 04:01:22 +00:00
Remove the write handler only if there are no longer objects in the output queue AND if the static buffer is empty. This bug was the cause of a possible server-stop-responding-to-client bug under some specific work load. Thanks to Pieter Noordhuis for spotting and fixing it.
This commit is contained in:
@ -610,7 +610,7 @@ void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) {
|
||||
}
|
||||
}
|
||||
if (totwritten > 0) c->lastinteraction = time(NULL);
|
||||
if (listLength(c->reply) == 0) {
|
||||
if (c->bufpos == 0 && listLength(c->reply) == 0) {
|
||||
c->sentlen = 0;
|
||||
aeDeleteFileEvent(server.el,c->fd,AE_WRITABLE);
|
||||
|
||||
|
Reference in New Issue
Block a user