mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
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:
parent
b3929f19d6
commit
97f5537828
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue