diff options
Diffstat (limited to 'lib/yahns/acceptor.rb')
-rw-r--r-- | lib/yahns/acceptor.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/yahns/acceptor.rb b/lib/yahns/acceptor.rb index cd9e055..0cebea2 100644 --- a/lib/yahns/acceptor.rb +++ b/lib/yahns/acceptor.rb @@ -19,7 +19,10 @@ module Yahns::Acceptor # :nodoc: # just keep looping this on every acceptor until the associated thread dies def ac_quit - return true unless defined?(@thrs) + unless defined?(@thrs) # acceptor has not started yet, freshly inherited + close + return true + end @thrs.each { |t| t[:yahns_quit] = true } return true if __ac_quit_done? |