diff --git a/supervisor/supervisord.py b/supervisor/supervisord.py index 8d9ebe30f..8d21eca33 100755 --- a/supervisor/supervisord.py +++ b/supervisor/supervisord.py @@ -173,11 +173,17 @@ def ordered_stop_groups_phase_2(self): def runforever(self): events.notify(events.SupervisorRunningEvent()) - timeout = 1 # this cannot be fewer than the smallest TickEvent (5) + first_poll = True socket_map = self.options.get_socket_map() while 1: + if first_poll: + timeout = 0 + first_poll = False + else: + timeout = 1 # this cannot not be fewer than the smallest TickEvent (5) + combined_map = {} combined_map.update(socket_map) combined_map.update(self.get_process_map())