Skip to content

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