summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2013-04-29 11:41:39 +0300
committerSaku Ytti <saku@ytti.fi>2013-04-29 11:41:39 +0300
commitd1a9d0412ab7c1d999598f6c801b1ae0624c4a9b (patch)
tree23d6e9a3ee6d4e1b177013aa928ac9086648255c
parent7ebf7bee657e518ba4f2bf28febd78b0a189a497 (diff)
Catch 'Errno::ECONNRESET' in Telnet#cmd
Some devices might throw us out, while we are waiting for command to compelete
-rw-r--r--lib/oxidized/input/telnet.rb2
-rw-r--r--oxidized.gemspec2
2 files changed, 2 insertions, 2 deletions
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
diff --git a/oxidized.gemspec b/oxidized.gemspec
index da255d6..1eb804f 100644
--- a/oxidized.gemspec
+++ b/oxidized.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'oxidized'
- s.version = '0.0.4'
+ s.version = '0.0.6'
s.platform = Gem::Platform::RUBY
s.authors = [ 'Saku Ytti' ]
s.email = %w( saku@ytti.fi )