lib/logstash/inputs/snmp.rb in logstash-input-snmp-1.2.3 vs lib/logstash/inputs/snmp.rb in logstash-input-snmp-1.2.4

- old
+ new

@@ -210,10 +210,17 @@ Stud.stoppable_sleep(@interval) { stop? } end end - def stop + def close + @client_definitions.each do |definition| + begin + definition[:client].close + rescue => e + logger.warn("error closing client on #{definition[:host_address]}, ignoring", :exception => e) + end + end end private OID_REGEX = /^\.?([0-9\.]+)$/