Skip to content

Commit

Permalink
master: Wait 1 second for SIGQUITs to get handled
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Josef 'Jeff' Sipek committed Aug 20, 2018
1 parent ce59136 commit 09c856b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/master/service-monitor.c
Expand Up @@ -631,7 +631,7 @@ static void services_monitor_wait_and_kill(struct service_list *service_list)
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);
}
}

Expand Down

0 comments on commit 09c856b

Please sign in to comment.