mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- Set a global when we do LogStash::Agent#stop so we can skip steps like
reconnections, etc.
This commit is contained in:
parent
1227c0b624
commit
b00cbd8805
2 changed files with 7 additions and 0 deletions
|
@ -106,6 +106,7 @@ class LogStash::Agent
|
|||
# TODO(sissel): Stop inputs, fluch outputs, wait for finish,
|
||||
# then stop the event loop
|
||||
EventMachine.stop_event_loop
|
||||
$EVENTMACHINE_STOPPING = true
|
||||
end
|
||||
|
||||
protected
|
||||
|
|
|
@ -25,6 +25,12 @@ class LogStash::Stomp
|
|||
end # def connection_completed
|
||||
|
||||
def unbind
|
||||
if $EVENTMACHINE_STOPPING
|
||||
@logger.debug(["Connection to stomp broker died (probably since we are exiting)",
|
||||
{ :url => @url }])
|
||||
return
|
||||
end
|
||||
|
||||
@logger.error(["Connection to stomp broker died, retrying.", { :url => @url }])
|
||||
@ready = false
|
||||
EventMachine::Timer.new(1) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue