Plug a server socket leak introduced in 1.299.
authorFabian Keil <fk@fabiankeil.de>
Thu, 8 Oct 2009 07:36:37 +0000 (07:36 +0000)
committerFabian Keil <fk@fabiankeil.de>
Thu, 8 Oct 2009 07:36:37 +0000 (07:36 +0000)
Privoxy-Regression-Test ftw.

jcc.c

diff --git a/jcc.c b/jcc.c
index 8116d7a..cb846ca 100644 (file)
--- 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);