Commit Diff


commit - 13b8324c4a6f46e18e58883630808bc8c4ed9e80
commit + 04de1423eb26da60c192d343a7e7a6bcda2aca37
blob - e14e6c08037aa53e57fd40825bba446313ef1b68
blob + 92d9939ab291445e53806b75609dfaa8209915ad
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
@@ -1272,6 +1272,9 @@ Handle_Write( CONN_ID Idx )
 		if (errno == EAGAIN || errno == EINTR)
 			return true;
 
+		/* Log write errors but do not close the connection yet.
+		 * Calling Conn_Close() now could result in too many recursive calls.
+		 */
 		if (!Conn_OPTION_ISSET(&My_Connections[Idx], CONN_ISCLOSING))
 			Log(LOG_ERR,
 			    "Write error on connection %d (socket %d): %s!",
@@ -1279,7 +1282,7 @@ Handle_Write( CONN_ID Idx )
 		else
 			LogDebug("Recursive write error on connection %d (socket %d): %s!",
 				 Idx, My_Connections[Idx].sock, strerror(errno));
-		Conn_Close(Idx, "Write error", NULL, false);
+
 		return false;
 	}