Fixed timeout warning

This commit is contained in:
RubenRocha 2016-02-19 21:12:01 +00:00
parent 8a15c36770
commit 72a69fcd16
1 changed files with 3 additions and 2 deletions

View File

@ -65,9 +65,10 @@ module Net; module SSH; module Transport
factory = options[:proxy]
if (factory)
@socket = timeout(options[:timeout] || 0) { factory.open(@host, @port) }
@socket = ::Timeout.timeout(options[:timeout] || 0) { factory.open(@host,
@port) }
else
@socket = timeout(options[:timeout] || 0) {
@socket = ::Timeout.timeout(options[:timeout] || 0) {
Rex::Socket::Tcp.create(
'PeerHost' => @host,
'PeerPort' => @port,