From edaf887b86d84378c94ef02fe7200e70f93f9279 Mon Sep 17 00:00:00 2001 From: Paul Sherratt Date: Fri, 6 Sep 2013 15:19:21 +0100 Subject: more errors to rescue from --- lib/oxidized/input/ssh.rb | 2 +- lib/oxidized/input/telnet.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index c0594db..dc90354 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -39,7 +39,7 @@ module Oxidized disconnect_cli @ssh.loop @ssh.close if not @ssh.closed? - rescue Net::SSH::Disconnect + rescue Errno::ECONNRESET, Net::SSH::Disconnect end end diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb index c4c8bab..26755ca 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 Timeout::Error, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTUNREACH + rescue Timeout::Error, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EPIPE, Errno::EHOSTUNREACH return false end end -- cgit v1.2.1