diff options
Diffstat (limited to 'lib/yahns/server_mp.rb')
-rw-r--r-- | lib/yahns/server_mp.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yahns/server_mp.rb b/lib/yahns/server_mp.rb index 6e65bd4..e328cbc 100644 --- a/lib/yahns/server_mp.rb +++ b/lib/yahns/server_mp.rb @@ -109,7 +109,7 @@ module Yahns::ServerMP # :nodoc: reap_all_workers case @sig_queue.shift when *EXIT_SIGS # graceful shutdown (twice for non graceful) - self.listeners = [] + @listeners.each(&:close).clear kill_each_worker(:QUIT) state = :QUIT when :USR1 # rotate logs @@ -162,7 +162,7 @@ module Yahns::ServerMP # :nodoc: alive = mp_sig_handle(worker, alive) rescue => e Yahns::Log.exception(@logger, "main worker loop", e) - end while alive || fdmap.size > 0 + end while alive || acceptors_alive || fdmap.size > 0 exit ensure quit_finish |