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

Make tcp_server retry binding the socket #176

Merged
merged 4 commits into from
Sep 6, 2023

Conversation

fmauch
Copy link
Collaborator

@fmauch fmauch commented Sep 4, 2023

It sometimes happens that binding the socket fails since it is already in use (e.g. when restarting the driver too fast). This commit should retry binding instead of simply throwing an exception

@fmauch fmauch requested review from urrsk and urmahp September 4, 2023 13:17
@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch coverage is 94.44% of modified lines.

❗ Current head 8442d50 differs from pull request most recent head 38396ed. Consider uploading reports for the commit 38396ed to get more accurate results

Files Changed Coverage
include/ur_client_library/comm/tcp_server.h ø
src/comm/tcp_server.cpp 94.44%

📢 Thoughts on this report? Let us know!.

Copy link
Collaborator

@urmahp urmahp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a good improvement and overall it looks good to me. I just have two small comments.

src/comm/tcp_server.cpp Outdated Show resolved Hide resolved
include/ur_client_library/comm/tcp_server.h Outdated Show resolved Hide resolved
@urmahp urmahp mentioned this pull request Sep 6, 2023
fmauch and others added 3 commits September 6, 2023 09:40
It sometimes happens that binding the socket fails since it is already in use
(e.g. when restarting the driver too fast). This commit should retry binding
instead of simply throwing an exception
@fmauch
Copy link
Collaborator Author

fmauch commented Sep 6, 2023

Holding for after #177 is merged.

@fmauch fmauch merged commit e2bebd6 into UniversalRobots:master Sep 6, 2023
16 of 17 checks passed
@fmauch fmauch deleted the retry_binding_socket branch September 6, 2023 11:28
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.

None yet

2 participants