From 0a2621c673df184ef6486119ea43736f9703987d Mon Sep 17 00:00:00 2001 From: Bonsai Date: Thu, 15 Apr 2021 13:44:08 +0800 Subject: [PATCH] clean condition and variable store to nwritten that is never read (#8788) --- src/networking.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/networking.c b/src/networking.c index ace41512f..977074df0 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1550,9 +1550,7 @@ int writeToClient(client *c, int handler_installed) { } atomicIncr(server.stat_net_output_bytes, totwritten); if (nwritten == -1) { - if (connGetState(c->conn) == CONN_STATE_CONNECTED) { - nwritten = 0; - } else { + if (connGetState(c->conn) != CONN_STATE_CONNECTED) { serverLog(LL_VERBOSE, "Error writing to client: %s", connGetLastError(c->conn)); freeClientAsync(c);