Merge pull request #5428 from soloestoy/client-protected

Avoid recreate write handler for protected client.
This commit is contained in:
Salvatore Sanfilippo 2018-10-09 18:02:56 +02:00 committed by GitHub
commit 29bfe4655c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1072,6 +1072,10 @@ int handleClientsWithPendingWrites(void) {
c->flags &= ~CLIENT_PENDING_WRITE;
listDelNode(server.clients_pending_write,ln);
/* If a client is protected, don't do anything,
* that may trigger write error or recreate handler. */
if (c->flags & CLIENT_PROTECTED) continue;
/* Try to write buffers to the client socket. */
if (writeToClient(c->fd,c,0) == C_ERR) continue;