Index: mpm_winnt.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
retrieving revision 1.195
diff -u -r1.195 mpm_winnt.c
--- mpm_winnt.c	2001/11/17 07:54:34	1.195
+++ mpm_winnt.c	2001/11/20 15:07:02
@@ -731,14 +731,6 @@
                 // return -1;
             }
 
-            /* SO_UPDATE_ACCEPT_CONTEXT is required for shutdown() to work */
-            if (setsockopt(pCompContext->accept_socket, SOL_SOCKET,
-                           SO_UPDATE_ACCEPT_CONTEXT, (char *)&nlsd,
-                           sizeof(nlsd))) {
-                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf,
-                             "setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.");
-                /* Not a failure condition. Keep running. */
-            }
         }
 
         /* AcceptEx on the completion context. The completion context will be 
@@ -773,6 +765,15 @@
 
             /* Wait for pending i/o */
             WaitForSingleObject(pCompContext->Overlapped.hEvent, INFINITE);
+        }
+
+        /* SO_UPDATE_ACCEPT_CONTEXT is required for shutdown() to work */
+        if (setsockopt(pCompContext->accept_socket, SOL_SOCKET,
+                       SO_UPDATE_ACCEPT_CONTEXT, (char *)&nlsd,
+                       sizeof(nlsd))) {
+            ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf,
+                         "setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.");
+            /* Not a failure condition. Keep running. */
         }
 
         /* When a connection is received, send an io completion notification to
