Skip to content

Problem: zsys_shutdown does not call zmq_term when it closes sockets #1590

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

Merged
merged 1 commit into from
Jan 3, 2017

Conversation

bluca
Copy link
Member

@bluca bluca commented Jan 3, 2017

Solution: decrement count of open sockets if it manages to close them
from the internal list.
The total count of open sockets might go up without a socket being
appended to the list, but if a socket is appended to the list then
count is always incremented. So it's safe to decrement the count as
sockets are popped out of the list and closed.
This increases the chances that a clean exit is achieved even with
dangling sockets.

Solution: decrement count of open sockets if it manages to close them
from the internal list.
The total count of open sockets might go up without a socket being
appended to the list, but if a socket is appended to the list then
count is always incremented. So it's safe to decrement the count as
sockets are popped out of the list and closed.
This increases the chances that a clean exit is achieved even with
dangling sockets.
@sappo sappo merged commit 7e73d04 into zeromq:master Jan 3, 2017
@bluca bluca deleted the zsys_shutdown_socket_count branch January 3, 2017 13:31
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