-
Notifications
You must be signed in to change notification settings - Fork 181
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
tcp server makeConnect() blocks forever #177
Comments
One way to fix this is to put this line in a |
@gavanderhoorn I tried using the What worked for me was to add the following lines around the
If this solution is desirable I could submit a PR however some of the unit tests did fail after making this change. |
@jrgnicho, this goes beyond my knowledge of the socket library. How did you come up with this solution? Is there a reference somewhere? Can you provide a test for this? I'm not entirely sure how you issue a |
Here is a link that describes how to disable blocking. However, I decided not to use that approach since it caused some of the unit tests in simple message to fail. |
In the absence of a connection, the
TcpServer::makeConnect()
method blocks the main thread and it won't exit even when the program is terminated with Ctrl-C. I can get around this by placing calling makeConnect() from a second thread however this alternative feels unsafe as the an unhandled exception is thrown when the program exits.I ran my node in ubuntu 16.04 with ros-kinetic.
The text was updated successfully, but these errors were encountered: