Don't exit on shutdown, just break out (lets unit tests continue)

This commit is contained in:
Jordan Sissel 2012-09-01 16:25:01 -07:00
parent 1f317a73b0
commit 1f991c7417

View file

@ -466,6 +466,7 @@ class LogStash::Agent
if @plugins.values.count { |p| p.alive? } == 0
@logger.warn("no plugins running, shutting down")
shutdown
break
end
@logger.debug("heartbeat")
end
@ -484,7 +485,6 @@ class LogStash::Agent
shutdown_plugins(@plugins)
# When we get here, all inputs have finished, all messages are done
@logger.info("Shutdown complete")
exit(0)
end # def shutdown
def shutdown_plugins(plugins)