lib/veewee/provider/core/helper/tcp.rb in veewee-0.3.0.alpha6 vs lib/veewee/provider/core/helper/tcp.rb in veewee-0.3.0.alpha7
- old
+ new
@@ -24,11 +24,11 @@
return false
end
# This tries to guess a local free tcp port
def guess_free_port(min_port,max_port)
- env.ui.info "Received port hint - #{min_port}"
+ ui.info "Received port hint - #{min_port}"
guessed_port=nil
for port in (min_port..max_port)
unless is_tcp_port_open?(get_local_ip, port)
@@ -36,14 +36,14 @@
break
end
end
if guessed_port.nil?
- env.ui.info "No free port available: tried #{min_port}..#{max_port}"
+ ui.error "No free port available: tried #{min_port}..#{max_port}"
exit -1
else
- env.ui.info "Found port #{guessed_port} available"
+ ui.info "Found port #{guessed_port} available"
end
return guessed_port
end
@@ -56,10 +56,10 @@
begin
Timeout::timeout(options[:timeout]) do
connected=false
while !connected do
begin
- env.ui.info "trying connection"
+ ui.info "trying connection"
s = TCPSocket.new(ip, options[:port])
s.close
block.call(ip);
return true
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH,Errno::ENETDOWN