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 14e6d78cef
commit 06b63e28f9

View file

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