]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
dont really close Udp port so we can still send on it; just disable handlers while...
authorwessels <>
Wed, 17 Apr 1996 02:31:22 +0000 (02:31 +0000)
committerwessels <>
Wed, 17 Apr 1996 02:31:22 +0000 (02:31 +0000)
src/main.cc

index 8c070b99f018f542ace35678025ab86c35eeb3f9..c23817fc2a442f3638bc33ae3fbe5fbc75114d1e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: main.cc,v 1.38 1996/04/16 18:30:54 wessels Exp $ */
+/* $Id: main.cc,v 1.39 1996/04/16 20:31:22 wessels Exp $ */
 
 /* DEBUG: Section 1             main: startup and main loop */
 
@@ -157,12 +157,14 @@ void serverConnectionsClose()
     if (theUdpConnection >= 0) {
        debug(21, 1, "FD %d Closing Udp connection\n",
            theUdpConnection);
-       comm_close(theUdpConnection);
+       /* Dont actually close it, just disable the read handler */
+       /* so we can still transmit while shutdown pending */
+       /* comm_close(theUdpConnection); */
        comm_set_select_handler(theUdpConnection,
            COMM_SELECT_READ,
            NULL,
            0);
-       theUdpConnection = -1;
+       /* theUdpConnection = -1; */
     }
 }
 
@@ -338,6 +340,11 @@ int main(argc, argv)
            /* house keeping */
            break;
        case COMM_SHUTDOWN:
+           /* delayed close so we can transmit while shutdown pending */
+           if (theUdpConnection > 0) {
+               comm_close (theUdpConnection);
+               theUdpConnection = -1;
+           }
            if (shutdown_pending) {
                normal_shutdown();
                exit(0);