Close redis connection on teardown

This commit is contained in:
Bob Corsaro 2011-05-30 20:31:15 -04:00
parent 2aa21df735
commit ee223789ab
2 changed files with 11 additions and 0 deletions

View file

@ -126,6 +126,8 @@ class LogStash::Inputs::Redis < LogStash::Inputs::Base
def teardown
if @data_type == 'channel' and @redis
@redis.unsubscribe
@redis.quit
@redis = nil
end
end
end # class LogStash::Inputs::Redis

View file

@ -69,4 +69,13 @@ class LogStash::Outputs::Redis < LogStash::Outputs::Base
raise e
end
end # def receive
public
def teardown
if @data_type == 'channel' and @redis
@redis.quit
@redis = nil
end
end
end