From 142f3814c4cc2766e8e051b903dfc73bc282df42 Mon Sep 17 00:00:00 2001 From: guarisma Date: Thu, 2 Feb 2017 23:22:37 -0500 Subject: [PATCH] Object#timeout is deprecated, use Timeout.timeout instead. Updating timeout to Timeout.timeout to stop annoying message from Metasploit: /usr/share/metasploit-framework/vendor/bundle/ruby/2.3.0/gems/openvas-omp-0.0.4/lib/openvas-omp.rb:201:in `sendrecv': Object#timeout is deprecated, use Timeout.timeout instead. --- lib/openvas-omp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/openvas-omp.rb b/lib/openvas-omp.rb index 21e8bd1..c6fc665 100644 --- a/lib/openvas-omp.rb +++ b/lib/openvas-omp.rb @@ -198,7 +198,7 @@ def sendrecv (tosend) size=0 begin begin - timeout(@read_timeout) { + Timeout.timeout(@read_timeout) { a = @socket.sysread(@bufsize) size=a.length # puts "sysread #{size} bytes"