diff options
Diffstat (limited to 'lib/oxidized/input')
| -rw-r--r-- | lib/oxidized/input/ssh.rb | 2 | ||||
| -rw-r--r-- | lib/oxidized/input/telnet.rb | 4 | 
2 files changed, 3 insertions, 3 deletions
| diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 3d14a57..430eaa2 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -12,7 +12,7 @@ module Oxidized        begin          @ssh = Net::SSH.start @node.ip, @node.auth[:username],                                :password => @node.auth[:password], :timeout => CFG.timeout -      rescue Timeout::Error, Net::SSH::Disconnect, Errno::ECONNREFUSED +      rescue Timeout::Error, Errno::ECONNREFUSED, Errno::ECONNRESET, Net::SSH::Disconnect          return false        end        open_shell @ssh unless @exec diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb index c1afde2..f1222d8 100644 --- a/lib/oxidized/input/telnet.rb +++ b/lib/oxidized/input/telnet.rb @@ -17,7 +17,7 @@ module Oxidized          expect password          @telnet.puts @node.auth[:password]          expect @node.prompt -      rescue  Errno::ECONNREFUSED, Timeout::Error +      rescue  Timeout::Error, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTUNREACH          return false        end      end @@ -28,7 +28,7 @@ module Oxidized        args.merge!({ 'Match' => expect, 'Timeout' => @timeout }) if expect        begin          @telnet.cmd args -      rescue Timeout::Error, Errno::ECONNRESET +      rescue Timeout::Error, Errno::ECONNRESET, Errno::EPIPE          return false        end      end | 
