diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/input/telnet.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb index 2da459e..09c3df9 100644 --- a/lib/oxidized/input/telnet.rb +++ b/lib/oxidized/input/telnet.rb @@ -39,8 +39,11 @@ module Oxidized end def disconnect - @pre_logout.each { |command| cmd(command, nil) } - @telnet.close + begin + @pre_logout.each { |command| cmd(command, nil) } + @telnet.close + rescue Errno::ECONNRESET + end end def username re=/^(Username|login)/ |