You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2017/04/11 14:09:01 UTC

svn commit: r1790978 - /httpd/httpd/trunk/server/mpm/winnt/child.c

Author: wrowe
Date: Tue Apr 11 14:09:00 2017
New Revision: 1790978

URL: http://svn.apache.org/viewvc?rev=1790978&view=rev
Log:
If the lingering close does not leave the socket in a disconnected state,
do not recycle the socket.


Modified:
    httpd/httpd/trunk/server/mpm/winnt/child.c

Modified: httpd/httpd/trunk/server/mpm/winnt/child.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/child.c?rev=1790978&r1=1790977&r2=1790978&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/child.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/child.c Tue Apr 11 14:09:00 2017
@@ -813,12 +813,12 @@ static DWORD __stdcall worker_main(void
 
         ap_process_connection(c, context->sock);
 
-        apr_socket_opt_get(context->sock, APR_SO_DISCONNECTED, &disconnected);
+        ap_lingering_close(c);
 
+        apr_socket_opt_get(context->sock, APR_SO_DISCONNECTED, &disconnected);
         if (!disconnected) {
             context->accept_socket = INVALID_SOCKET;
         }
-        ap_lingering_close(c);
     }
 
     ap_update_child_status_from_indexes(0, thread_num, SERVER_DEAD, NULL);