diff options
Diffstat (limited to 'lib/mongrel/configurator.rb')
-rw-r--r-- | lib/mongrel/configurator.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb index 19ea125..c62f153 100644 --- a/lib/mongrel/configurator.rb +++ b/lib/mongrel/configurator.rb @@ -288,9 +288,13 @@ module Mongrel # stop processing requests (gracefully). By default it # assumes that you don't want to restart. def stop(needs_restart=false) - @listeners.each {|name,s| - s.stop - } + @listeners.map do |name, listener| + stopper = Thread.new { listener.stop } + stopper.priority = 10 + stopper + end.each do |stopper| + stopper.join + end @needs_restart = needs_restart end |