The delay (previously 100ms, now 1s) is intended to delay our exit enough so
that the child processes have a chance to receive & handle the SIGQUITs we
just sent. If we don't wait long enough, it is possible that we'll get
restarted before our children had the chance to stop listening on their
sockets and we'll hit "address already in use" type errors.
Increasing the delay does not fix the issue, but it masks it better.
if (service_list_processes_close_listeners(service_list)) {
/* SIGQUITs were sent. wait a little bit to make sure they're
also processed before quitting. */
- usleep(100000);
+ usleep(1000000);
}
}