-/* $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 */
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; */
}
}
/* 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);