mirror of
https://github.com/fluencelabs/redis
synced 2025-06-16 10:41:22 +00:00
Return OK on QUIT
This commit is contained in:
@ -546,6 +546,9 @@ void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) {
|
||||
if (listLength(c->reply) == 0) {
|
||||
c->sentlen = 0;
|
||||
aeDeleteFileEvent(server.el,c->fd,AE_WRITABLE);
|
||||
|
||||
/* Close connection after entire reply has been sent. */
|
||||
if (c->flags & REDIS_QUIT) freeClient(c);
|
||||
}
|
||||
}
|
||||
|
||||
@ -675,6 +678,10 @@ again:
|
||||
* will try to reiterate. The following line will make it return asap. */
|
||||
if (c->flags & REDIS_BLOCKED || c->flags & REDIS_IO_WAIT) return;
|
||||
|
||||
/* Never continue to process the input buffer after QUIT. After the output
|
||||
* buffer is flushed (with the OK), the connection will be dropped. */
|
||||
if (c->flags & REDIS_QUIT) return;
|
||||
|
||||
if (seeknewline && c->bulklen == -1) c->newline = strchr(c->querybuf,'\n');
|
||||
seeknewline = 1;
|
||||
if (c->bulklen == -1) {
|
||||
|
Reference in New Issue
Block a user