diff options
author | Saku Ytti <saku@ytti.fi> | 2014-08-05 15:54:23 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-08-05 15:54:23 +0300 |
commit | 68b13e27b53cf935ef23037fde6e53df59fa8b3e (patch) | |
tree | c690d1f76225c7e279059ebaaec6466bfd4ebfe9 | |
parent | a2ef75aacd58ddaf07af2ef0261ea31c40667d3f (diff) |
fix ssh close when far end closes disgracefully
ALU ISAM DSLAM does this
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | lib/oxidized/input/ssh.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index df997d5..8d0cd16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.2.3 +- BUGFIX: rescue @ssh.close when far end closes ungracefully (ALU ISAM) + # 0.2.2 - BUGFIX: mark node as failure if unknown error is raised 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 |