Update the conditions to match the behavior of runner

Fixes #6943
This commit is contained in:
Pier-Hugues Pellerin 2017-04-20 11:46:54 -04:00
parent 8e099d49bd
commit 05d01cf20c

View file

@ -75,11 +75,8 @@ class LogStash::Agent
Stud.interval(@reload_interval) { reload_state! }
else
while !Stud.stop?
if clean_state || running_user_defined_pipelines?
if clean_state? || running_user_defined_pipelines?
sleep(0.5)
elsif !running_user_defined_pipelines? && running_pipelines? && Stud.stop?
logger.debug("Shutting down system pipelines")
shutdown_pipelines
else
break
end