Improve socket connection robustness in external_control.urscript#453
Open
srvald wants to merge 9 commits intoUniversalRobots:masterfrom
Open
Improve socket connection robustness in external_control.urscript#453srvald wants to merge 9 commits intoUniversalRobots:masterfrom
srvald wants to merge 9 commits intoUniversalRobots:masterfrom
Conversation
More documented error popup depending on the socket failing Co-authored-by: Felix Exner <feex@universal-robots.com>
Remove textmsg as external control active message will appear after sockets have been connected successfully Co-authored-by: Felix Exner <feex@universal-robots.com>
This way we avoid getting into a situation where things might restart while attempting to connect to one of the sockets.
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on March 20. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
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.
Summary
This PR strengthens the socket connection logic in external_control.urscript to make driver startup more reliable and fault‑tolerant.
Issue related: #439
What’s changed
Added a connect_socket_with_retry() helper with configurable attempts and delay.
Enforced the required connection order:
Implemented a loop that retries only the sockets that are not yet connected (no redundant reconnects).
Added a popup notification when any connection attempt fails.
Why
Ensures stable behavior during driver startup under transient network conditions.
Avoids unnecessary reconnection attempts once a socket is successfully established.
Avoids the program to run although the sockets haven't been connected.
Testing
Manual tests were performed using netcat to simulate the three server endpoints:
Notes
The logic explicitly prevents reverse control from opening before the other two sockets are established.
Popup messaging provides clear operator feedback without spamming unnecessary retries.
Note
Low Risk
The provided diff contains no code changes, so there is no functional or security risk. Verify the PR includes the intended commit(s) before merging.
Overview
This PR appears to be a no-op: the provided
git diffis empty (shows only+++ /dev/null).If the intent was to improve socket connection robustness in
external_control.urscript, the expected changes are not present in this diff and should be rechecked before review/merge.Written by Cursor Bugbot for commit 59db585. This will update automatically on new commits. Configure here.