mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
Close redis connection on teardown
This commit is contained in:
parent
2aa21df735
commit
ee223789ab
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue