about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--test/test_helper.rb6
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)