* and 'out' sockets might be just one FD. This prevents this
* function from executing repeatedly. When we are really ready to
* exit or restart, main will comm_close the 'out' descriptor.
- */ theInSnmpConnection = -1;
+ */
+ theInSnmpConnection = -1;
/*
* Normally we only write to the outgoing SNMP socket, but we
if (theOutSnmpConnection > -1) {
debugs(49, 1, "FD " << theOutSnmpConnection << " Closing SNMP socket");
comm_close(theOutSnmpConnection);
+ /* make sure the SNMP out connection is unset */
+ theOutSnmpConnection = -1;
}
}
void
fatal(const char *message)
{
+ /* suppress secondary errors from the dying */
+ shutting_down = 1;
+
releaseServerSockets();
/* check for store_dirs_rebuilding because fatal() is often
* used in early initialization phases, long before we ever