diff options
Diffstat (limited to 'lib/oxidized/input/telnet.rb')
-rw-r--r-- | lib/oxidized/input/telnet.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb index f946e92..2da459e 100644 --- a/lib/oxidized/input/telnet.rb +++ b/lib/oxidized/input/telnet.rb @@ -25,7 +25,11 @@ module Oxidized Log.debug "Telnet: #{cmd} @#{@node.name}" args = { 'String' => cmd } args.merge!({ 'Match' => expect, 'Timeout' => @timeout }) if expect - @telnet.cmd args + begin + @telnet.cmd args + rescue Timeout::Error + return false + end end private |