-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ZMQ_REQ socket does not report ZMQ_POLLOUT when ZMQ_REQ_RELAXED is set #2824
Comments
Yeah I think it makes sense, and your fix should work. Would you please send a PR, including the test for it? |
I would, but I'm struggling to run the tests. Is there any guide? |
Think I managed to get it working on macOS by running:
|
That should work although it's for the CI, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
When creating a ZMQ_REQ socket with ZMQ_REQ_RELAXED enabled, the ZMQ_EVENTS socket option does not indicate the socket is writable after sending the first message. In spite of that, a call to
zmq_send()
does in fact succeed without errors (as expected).Environment
Minimal test code
What's the actual result?
The output of this program is:
That is;
(events & ZMQ_POLLOUT) == ZMQ_POLLOUT
evaluates as true for the first message, but false after sending the second message.What's the expected result?
My expectation is that the output would be:
In other words;
(events & ZMQ_POLLOUT) == ZMQ_POLLOUT
for the REQ socket if ZMQ_REQ_RELAXED is set.This seems like a problem in https://github.com/zeromq/libzmq/blob/master/src/req.cpp#L216 – I believe the code should check for strictness just like sending does; therefore I think it should be:
Does this make sense? Am I right in expecting that the REQ socket with ZMQ_REQ_RELAXED enabled should be writable according to the ZMQ_EVENTS socket option?
The text was updated successfully, but these errors were encountered: