]> granicus.if.org Git - apache/commitdiff
The be-certain-we-own-the-socket patch to listen.c fails if we hang
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 14 Mar 2002 04:08:51 +0000 (04:08 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 14 Mar 2002 04:08:51 +0000 (04:08 +0000)
  on to the originals after duplicating sockets.  If you dup, you aught
  to be closing the source.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93925 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/mpm_winnt.c

index 4d46b215db643a5ce3dcf5c9f550234e4c80d1ee..17c69cfd57293f02c363453b5cca2cb8f50697e4 100644 (file)
@@ -503,6 +503,7 @@ static int set_listeners_noninheritable(apr_pool_t *p)
                          "set_listeners_noninheritable: DuplicateHandle failed.");
         }
         else {
+            closesocket(nsd);
             nsd = (SOCKET) dup;
             apr_os_sock_put(&lr->sd, &nsd, p);
         }