From d1a9d0412ab7c1d999598f6c801b1ae0624c4a9b Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Mon, 29 Apr 2013 11:41:39 +0300 Subject: Catch 'Errno::ECONNRESET' in Telnet#cmd Some devices might throw us out, while we are waiting for command to compelete --- lib/oxidized/input/telnet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb index 09c3df9..0ec08f9 100644 --- a/lib/oxidized/input/telnet.rb +++ b/lib/oxidized/input/telnet.rb @@ -27,7 +27,7 @@ module Oxidized args.merge!({ 'Match' => expect, 'Timeout' => @timeout }) if expect begin @telnet.cmd args - rescue Timeout::Error + rescue Timeout::Error, Errno::ECONNRESET return false end end -- cgit v1.2.1