mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
redirect
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@690 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
64a213128f
commit
eb8e5ea6c6
2 changed files with 5 additions and 5 deletions
|
@ -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?)
|
||||
|
|
|
@ -77,9 +77,9 @@ class ConfiguratorTest < Test::Unit::TestCase
|
|||
assert $test_plugin_fired == 6, "Test filter plugin didn't run 6 times."
|
||||
end
|
||||
|
||||
# redirect_test_io do
|
||||
config.stop(false, false)
|
||||
# end
|
||||
redirect_test_io do
|
||||
config.stop(false, true)
|
||||
end
|
||||
|
||||
assert_raise Errno::EBADF, Errno::ECONNREFUSED do
|
||||
res = Net::HTTP.get(URI.parse("http://localhost:4501/"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue