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

Use zmq_die in poll_one #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

vrurg
Copy link

@vrurg vrurg commented Mar 6, 2021

This would provide user code with more information about errors.

This would provide user code with more information about errors.
vrurg added a commit to vrurg/cro-zeromq that referenced this pull request Mar 7, 2021
Since `poll_one` is a blocking call, when service is stopped it throws
with `X::AdHoc` due to -1 returned by `zmq_poll`. Unfortunately,
`poll_one` doesn't use `zmq_die` and therefore there is no way to
determine if the error is caused by socket closing or not. For this
reason this PR relies on `$closer` value to find out if the exception
must be rethrows or dropped.

PR arnsholt/Net-ZMQ#22 is submitted to replace plain `die` with
`zmq_die`. But until then this PR should be ok get things straighten
out.
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.

1 participant