diff options
Diffstat (limited to 'lib/mongrel')
-rw-r--r-- | lib/mongrel/configurator.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb index 5d5d374..ad88bb8 100644 --- a/lib/mongrel/configurator.rb +++ b/lib/mongrel/configurator.rb @@ -287,11 +287,11 @@ module Mongrel # Calls .stop on all the configured listeners so they # stop processing requests (gracefully). By default it # assumes that you don't want to restart. - def stop(needs_restart=false, asynchronous=true) + def stop(needs_restart=false, synchronous=true) @listeners.each {|name,s| s.stop } - unless asynchronous + if synchronous sleep(0.5) while (@listeners.map do |name, listener| listener.acceptor.alive? end.any?) |