summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 23:03:40 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 23:03:40 +0000
commit2a9ea113550c8358788dd1a3f163aba963b28d96 (patch)
treed26226f60d07337043b0a21af221d458f3eb51a3 /test/webrick
parentef82fcf0674611b4c373dc8497da19d5bc92466a (diff)
* lib/webrick/server.rb (initialize): Initialize shutdown pipe here
to avoid race condition. (cleanup_shutdown_pipe): New private method. (cleanup_listener): Extracted from shutdown method. Call this method from start method to avoid race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick')
-rw-r--r--test/webrick/test_server.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/webrick/test_server.rb b/test/webrick/test_server.rb
index fa7fc94..f765da6 100644
--- a/test/webrick/test_server.rb
+++ b/test/webrick/test_server.rb
@@ -34,6 +34,10 @@ class TestWEBrickServer < Test::Unit::TestCase
def listener.to_io # IO.select invokes #to_io.
raise SignalException, 'SIGTERM' # simulate signal in main thread
end
+ def listener.shutdown
+ end
+ def listener.close
+ end
server = WEBrick::HTTPServer.new({
:BindAddress => "127.0.0.1", :Port => 0,