selenium-webdriver 2.22.2.rc1 → 2.22.2.rc2
Sign up to get free protection for your applications and to get access to all the features.
@@ -20,15 +20,7 @@ module Selenium
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.free?(port)
|
23
|
-
Platform.interfaces.each
|
24
|
-
begin
|
25
|
-
TCPServer.new(host, port).close
|
26
|
-
rescue Errno::EADDRNOTAVAIL
|
27
|
-
$stderr.puts "could not bind to #{host}:#{port}" if $DEBUG
|
28
|
-
# ignored - some machines appear unable to bind to e.g. their local IP
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
23
|
+
Platform.interfaces.each { |host| TCPServer.new(host, port).close }
|
32
24
|
true
|
33
25
|
rescue SocketError, Errno::EADDRINUSE
|
34
26
|
false
|