-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update to new shutdown semantics #21
Conversation
not sure whether this line needs to be changed to |
@@ -116,7 +115,7 @@ def run(output_queue) | |||
def server(protocol, output_queue) | |||
self.send("#{protocol}_listener", output_queue) | |||
rescue => e | |||
if @shutdown_requested.false? | |||
if !stop? | |||
@logger.warn("syslog listener died", :protocol => protocol, :address => "#{@host}:#{@port}", :exception => e, :backtrace => e.backtrace) | |||
sleep(5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need to be updated to use Stud.stoppable_stop { stop? }
, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using stoppable_stop here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to include this (stoppable_sleep
)
@talevy RE: #21 (comment) I don't think is necessary, however In some plugins I made I changed the infinite loop just to indicate better that this loop will stop some time. |
57ba2c3
to
62c0c04
Compare
@purbon updated with your comments! thanks! |
62c0c04
to
862945f
Compare
LGTM |
Merged sucessfully into master! |
Fixes #20.
depends on elastic/logstash#3895 and elastic/logstash-devutils#32.