NULL, 0);
for (s = Config.mcast_group_list; s; s = s->next)
ipcache_nbgethostbyname(s->key, mcastJoinGroups, NULL);
- debug(1, 1) ("Accepting ICP connections on port %d, FD %d.\n",
+ debug(1, 1) ("Accepting ICP messages on port %d, FD %d.\n",
(int) port, theInIcpConnection);
if ((addr = Config.Addrs.udp_outgoing).s_addr != no_addr.s_addr) {
enter_suid();
COMM_SELECT_READ,
icpHandleUdp,
NULL, 0);
- debug(1, 1) ("Accepting ICP connections on port %d, FD %d.\n",
- (int) port, theInIcpConnection);
+ debug(1, 1) ("Outgoing ICP messages on port %d, FD %d.\n",
+ (int) port, theOutIcpConnection);
fd_note(theOutIcpConnection, "Outgoing ICP socket");
fd_note(theInIcpConnection, "Incoming ICP socket");
} else {
/*
- * $Id: main.cc,v 1.199 1997/12/30 04:22:06 wessels Exp $
+ * $Id: main.cc,v 1.200 1998/01/02 06:56:52 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
}
}
NHttpSockets = 0;
- if (theInIcpConnection >= 0) {
+ if (theInIcpConnection > -1) {
/* NOTE, don't close outgoing ICP connection, we need to write to
* it during shutdown */
debug(1, 1) ("FD %d Closing ICP connection\n",
0);
theInIcpConnection = -1;
}
+ /*
+ * Normally we only write to the outgoing ICP socket, but we
+ * also have a read handler there to catch messages sent to that
+ * specific interface. During shutdown, we must disable reading
+ * on the outgoing socket.
+ */
+ if (theOutIcpConnection > -1)
+ commSetSelect(theOutIcpConnection, COMM_SELECT_READ, NULL, NULL, 0);
if (icmp_sock > -1)
icmpClose();
#ifdef SQUID_SNMP