summaryrefslogtreecommitdiff
path: root/lib/oxidized/input
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-08-05 15:54:23 +0300
committerSaku Ytti <saku@ytti.fi>2014-08-05 15:54:23 +0300
commit68b13e27b53cf935ef23037fde6e53df59fa8b3e (patch)
treec690d1f76225c7e279059ebaaec6466bfd4ebfe9 /lib/oxidized/input
parenta2ef75aacd58ddaf07af2ef0261ea31c40667d3f (diff)
fix ssh close when far end closes disgracefully
ALU ISAM DSLAM does this
Diffstat (limited to 'lib/oxidized/input')
-rw-r--r--lib/oxidized/input/ssh.rb2
1 files changed, 1 insertions, 1 deletions
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