From: Fabian Keil Date: Fri, 12 Oct 2012 11:19:35 +0000 (+0000) Subject: Use the shiny-new drain_and_close_socket() when closing client sockets in serve() X-Git-Tag: v_3_0_20~255 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=ad41864ed8f76e52d2538b5065a1101061d0d9a2 Use the shiny-new drain_and_close_socket() when closing client sockets in serve() Hopefully this fixes the page truncation issue reported with Opera in #3464439. --- diff --git a/jcc.c b/jcc.c index 32e6f0d8..f8ae2021 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.387 2012/09/04 08:37:51 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.388 2012/09/04 08:39:58 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2607,7 +2607,7 @@ static void serve(struct client_state *csp) remember_connection(&csp->server_connection); csp->server_connection.sfd = JB_INVALID_SOCKET; - close_socket(csp->cfd); + drain_and_close_socket(csp->cfd); csp->cfd = JB_INVALID_SOCKET; privoxy_mutex_lock(&connection_reuse_mutex); if (!monitor_thread_running) @@ -2666,7 +2666,7 @@ static void serve(struct client_state *csp) "Keep-alive: %u, Socket alive: %u. Data available: %u.", csp->cfd, 0 != (csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE), socket_is_still_alive(csp->cfd), data_is_available(csp->cfd, 0)); - close_socket(csp->cfd); + drain_and_close_socket(csp->cfd); } csp->flags &= ~CSP_FLAG_ACTIVE;