]> git.saurik.com Git - redis.git/commitdiff
Redis test port allocation fixed.
authorantirez <antirez@gmail.com>
Wed, 7 Dec 2011 16:15:17 +0000 (17:15 +0100)
committerantirez <antirez@gmail.com>
Wed, 7 Dec 2011 16:15:17 +0000 (17:15 +0100)
tests/test_helper.tcl

index 4c30b3c6fdb6658b8deb66a9c5393988beb4b5b6..2918fe7af60b4e45320e8420bd8867addb97230a 100644 (file)
@@ -153,9 +153,9 @@ proc cleanup {} {
 proc find_available_port start {
     for {set j $start} {$j < $start+1024} {incr j} {
         if {[catch {
 proc find_available_port start {
     for {set j $start} {$j < $start+1024} {incr j} {
         if {[catch {
-            set fd [socket 127.0.0.1 $start]
+            set fd [socket 127.0.0.1 $j]
         }]} {
         }]} {
-            return $start
+            return $j
         } else {
             close $fd
         }
         } else {
             close $fd
         }