Fixed client hanging when using startup() after stop() a few times, and fixed is_server_connected being always True#100
Open
hello-robot-shehab wants to merge 6 commits into
Open
Conversation
…erver isn't running, causing hanging. Cleaned up stop() in Client classes.
…ther _server_connected is truthy
hello-robot-shehab
marked this pull request as ready for review
July 15, 2026 17:48
hello-binit
requested review from
hello-binit
and removed request for
hello-bharadwaj
July 15, 2026 19:08
hello-robot-shehab
marked this pull request as draft
July 15, 2026 19:12
Contributor
Author
|
I ran into the zmq bug again during REx_camera_calibate. Okay this was happening because of gc. Added a test for garbage collection, and fixed the hanging by using linger=0 |
hello-robot-shehab
marked this pull request as ready for review
July 15, 2026 21:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Many hours were wasted on clients' zmq hanging for no reason. The bug is caught!
The main culprit appears to be self.context.term() unable to close out zmq sockets until Ctrl+C was pressed. We'd known this gave a zmq exception:
#94 describes a similar behavior with zmq hanging.
Steps to reproduce:
test/test_client_connection.pyon themainbranch (Note: this file is introduced in this PR, so just copy it to yourmainand run it!)mainis thetest_require_connection.py, this is fixed in this PR.To test
test/test_client_connection.pytest/test_server_connection.pytest/test_requite_connection.pyAnd observe that they pass.