Skip to content

Commit

Permalink
Avoid recreate write handler for protected client.
Browse files Browse the repository at this point in the history
  • Loading branch information
soloestoy committed Oct 9, 2018
1 parent 8e2bbe9 commit 35b7296
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 35b7296

Please sign in to comment.