From 68b13e27b53cf935ef23037fde6e53df59fa8b3e Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Tue, 5 Aug 2014 15:54:23 +0300 Subject: fix ssh close when far end closes disgracefully ALU ISAM DSLAM does this --- lib/oxidized/input/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 570f8a8..e3fcede 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -59,7 +59,7 @@ module Oxidized Timeout::timeout(CFG.timeout) { @ssh.loop } rescue Errno::ECONNRESET, Net::SSH::Disconnect, IOError ensure - @ssh.close if not @ssh.closed? + (@ssh.close rescue true) unless @ssh.closed? end def shell_open ssh -- cgit v1.2.1