prevent force shutdown to be blocked by with_pipelines

if force shutdown uses `with_pipelines` then it will never acquire the
`@pipelines_lock` from `shutdown_pipelines` until it terminates.

This PR makes force shutdown use `@pipelines` directly, fixing it.

Fixes #7918
This commit is contained in:
Joao Duarte 2017-08-05 00:53:53 +01:00 committed by João Duarte
parent b3929f19d6
commit 97f5537828

View file

@ -428,11 +428,9 @@ class LogStash::Agent
end
def force_shutdown_pipelines!
with_pipelines do |pipelines|
pipelines.each do |_, pipeline|
# TODO(ph): should it be his own action?
pipeline.force_shutdown!
end
@pipelines.each do |_, pipeline|
# TODO(ph): should it be his own action?
pipeline.force_shutdown!
end
end