From 624a05d0884af835e34984f4198ffece3189f9a5 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Thu, 8 Oct 2009 07:36:37 +0000 Subject: [PATCH] Plug a server socket leak introduced in 1.299. Privoxy-Regression-Test ftw. --- jcc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jcc.c b/jcc.c index 8116d7a8..cb846ca8 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.299 2009/10/04 15:45:11 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.300 2009/10/04 15:46:25 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2609,7 +2609,6 @@ static void serve(struct client_state *csp) } } while (continue_chatting); - mark_connection_closed(&csp->server_connection); #else chat(csp); #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ @@ -2622,6 +2621,10 @@ static void serve(struct client_state *csp) close_socket(csp->server_connection.sfd); } +#ifdef FEATURE_CONNECTION_KEEP_ALIVE + mark_connection_closed(&csp->server_connection); +#endif + if (csp->cfd != JB_INVALID_SOCKET) { close_socket(csp->cfd); -- 2.39.2