Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent exception caused by
$service.stop
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.
- Loading branch information