Skip to content
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

Catch IOError in stop #18

Merged
merged 1 commit into from
Feb 11, 2017

Conversation

breml
Copy link
Contributor

@breml breml commented Jan 19, 2017

If socket with @mode == client was closed by the client, an other call
to @client_socket.close will raise an IOError. We catch this
IOError and let logstash stop without error.

@@ -139,5 +139,8 @@ def stop
else
@client_socket.close
end
rescue IOError
# if socket with @mode == client was closed by the client, an other call to @client_socket.close
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we log here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

If socket with @mode == client was closed by the client, an other call
to @client_socket.close will raise an IOError. We catch this
IOError, log a warning and let logstash stop without error.
@breml breml force-pushed the bugfix-ioerror-on-close branch from b2249bc to 2761f4e Compare February 9, 2017 10:20
@suyograo
Copy link
Contributor

LGTM

@suyograo suyograo merged commit 1719ad5 into logstash-plugins:master Feb 11, 2017
@breml breml deleted the bugfix-ioerror-on-close branch February 11, 2017 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants