Hi!
I get this error:
···
--------------------------
/app/ruby/1.8.4/lib/ruby/1.8/net/telnet.rb:551:in `waitfor': timed out
while waiting for more data (Timeout::Error)
from ./proc_ctrl/telnetcom.rb:44:in `alive?'
from ./proc_ctrl/proc_manager.rb:91:in `check_procs_status'
from ./proc_ctrl/proc_manager.rb:90:in `check_procs_status'
from ./check_proc.rb:140:in `main'
from ./check_proc.rb:157
--------------------------
though my code looks like this (shortend), line 44 marked:
--------------------------
begin
telnet_srv = Net::Telnet.new("Host" => @address, "Port" =>
@port,
"Telnetmode" => false, "Prompt" =>
prompt)
telnet_srv.waitfor("Match" => prompt) #LINE 44
response = telnet_srv.cmd("String" => @cmd, "Match" =>
prompt).gsub(prompt, "")
rescue
#do some rescuing
end
--------------------------
How can it raise that Timeout::Error when I use the begin/rescue
statement?
Thanks!
/Rick
--
Posted via http://www.ruby-forum.com/.