Skip to content

snmptrap: handle shutdown#1

Open
elasticsearch-bot wants to merge 3 commits intomainfrom
bot-migrated-pr/1534
Open

snmptrap: handle shutdown#1
elasticsearch-bot wants to merge 3 commits intomainfrom
bot-migrated-pr/1534

Conversation

@elasticsearch-bot
Copy link

Previously, when trying to shutdown logstash, the snmptrap plugin would
endlessly try to restart. This change catches the ShutdownSignal
exception, exits the listening thread and returns, allowing Logstash to
shutdown.
Moved from elastic/logstash#1534

Shawn J. Goff added 3 commits January 19, 2015 22:27
This rescue unnecessarily caught all exceptions. This particularly
masked the ShutdownSignal exception, which would prevent Logstash from
shutting down properly.

This rescue isn't necessary; there is already a rescue around the
function call, so this one is being removed.
When trying to shutdown logstash, the snmptrap plugin would endlessly
try to restart. This change makes the plugin respond to the
ShutdownSignal exception by killing the listening thread and returning.
This allows Logstash to shutdown normally.
Methods have an implicit begin/end within them; there is no need to add
an extra one.
@ghost
Copy link

ghost commented Nov 2, 2015

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants