diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-02 13:35:29 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-02 13:35:29 -0700 |
commit | 65717ecbab432f4acd093d2efefd52bce66409d8 (patch) | |
tree | 8c61186117b5db4858dd91a0048d66ac804c8f5b | |
parent | cc6ffaf42307ab3bd072c58bd492fb5c5204e687 (diff) | |
download | unicorn-65717ecbab432f4acd093d2efefd52bce66409d8.tar.gz |
Checking for addr to match the DEFAULT_HOST constant is wrong since having only 127.0.0.1:8080 will still prevent 0.0.0.0:8080 from being bound.
-rw-r--r-- | test/test_helper.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 3a3e42f..404bcb2 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -104,10 +104,8 @@ def unused_port(addr = '127.0.0.1') begin begin port = base + rand(32768 - base) - if addr == Unicorn::Const::DEFAULT_HOST - while port == Unicorn::Const::DEFAULT_PORT - port = base + rand(32768 - base) - end + while port == Unicorn::Const::DEFAULT_PORT + port = base + rand(32768 - base) end sock = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0) |