From 09c856b4d82d2b77fa6575b6d7ec229b53091187 Mon Sep 17 00:00:00 2001 From: Josef 'Jeff' Sipek Date: Mon, 20 Aug 2018 18:07:30 -0400 Subject: [PATCH] master: Wait 1 second for SIGQUITs to get handled 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. --- src/master/service-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/master/service-monitor.c b/src/master/service-monitor.c index 7f1f2451a3..a1d9795dbf 100644 --- a/src/master/service-monitor.c +++ b/src/master/service-monitor.c @@ -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); } }