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

Fixed issue #1690 (ZMQ_REQ_RELAXED) #1691

Merged
merged 1 commit into from
Jan 1, 2016
Merged

Conversation

FredTreg
Copy link
Contributor

@FredTreg FredTreg commented Jan 1, 2016

When using ZMQ_REQ_RELAXED and a 'send' is executed after another 'send' the
previous code would terminate the 'reply_pipe' if any.
This is incorrect as terminating the reply pipe also terminates the send pipe
as they are the same (a pipe associated with a socket is bidirectional).
Doing a terminate on the pipe sets an internal flag called out_active to false
and the pipe can no longer send messages.
Removing the 'terminate' solves the problem. Removing this call is not an issue
as the incorrect ordering of messages that could be incurred is taken care of
by the ZMQ_REQ_CORRELATE option if needed.

When using ZMQ_REQ_RELAXED and a 'send' is executed after another 'send' the
previous code would terminate the 'reply_pipe' if any.
This is incorrect as terminating the reply pipe also terminates the send pipe
as they are the same (a pipe associated with a socket is bidirectional).
Doing a terminate on the pipe sets an internal flag called out_active to false
and the pipe can no longer send messages.
Removing the 'terminate' solves the problem. Removing this call is not an issue
as the incorrect ordering of messages that could be incurred is taken care of
by the ZMQ_REQ_CORRELATE option if needed.
c-rack added a commit that referenced this pull request Jan 1, 2016
Fixed issue #1690 (ZMQ_REQ_RELAXED)
@c-rack c-rack merged commit c30676f into zeromq:master Jan 1, 2016
@c-rack
Copy link
Member

c-rack commented Jan 1, 2016

Thanks. Do you think it would be possible to add a minimal test case based on your code in #1690, too?

@FredTreg
Copy link
Contributor Author

FredTreg commented Jan 1, 2016

I guess I can. Give me a couple of days though, I am using a Java binding to do my testing so I would need to set the proper C++ environment to create the test case. (and thanks for merging, that was quick :)

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