diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-10 06:11:10 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-10 06:11:10 +0000 |
commit | 8392f8186cd21f9190474bd6b5ac6ec58c7af96a (patch) | |
tree | 93784aad02a418f1203148f35bbbceded6e05925 /test/test_middleware_unicorn.rb | |
parent | b353e42e6f12f26a926bbb3202c8bb8e7a916d1c (diff) | |
download | raindrops-8392f8186cd21f9190474bd6b5ac6ec58c7af96a.tar.gz |
Oops, don't let GC close our listener before Unicorn can inherit it.
Diffstat (limited to 'test/test_middleware_unicorn.rb')
-rw-r--r-- | test/test_middleware_unicorn.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_middleware_unicorn.rb b/test/test_middleware_unicorn.rb index 7949f78..0a506e5 100644 --- a/test/test_middleware_unicorn.rb +++ b/test/test_middleware_unicorn.rb @@ -6,9 +6,9 @@ class TestMiddlewareUnicorn < Test::Unit::TestCase def setup @host = ENV["UNICORN_TEST_ADDR"] || "127.0.0.1" - sock = TCPServer.new @host, 0 - @port = sock.addr[1] - ENV["UNICORN_FD"] = sock.fileno.to_s + @sock = TCPServer.new @host, 0 + @port = @sock.addr[1] + ENV["UNICORN_FD"] = @sock.fileno.to_s @host_with_port = "#@host:#@port" @opts = { :listeners => [ @host_with_port ] } @addr_regexp = Regexp.escape @host_with_port |