-
Notifications
You must be signed in to change notification settings - Fork 141
fix: teardown blocks indefinitely when a reconnect thread is active and the robot is unreachable (#368) #519
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
Open
urrsk
wants to merge
23
commits into
master
Choose a base branch
from
fix/rtde-reconnect-thread-blocking-destructor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
9e198fb
fix(TCPSocket): make between-attempt sleep interruptible via close()
cursoragent bd62594
fix(RTDEClient): disconnect before joining reconnect thread; always d…
cursoragent 209b5f5
test: add regression tests for reconnect-thread blocking destructor
cursoragent 657a1bc
fix(PrimaryClient): close stream before joining reconnect thread; int…
urrsk 5b22c97
fix(TCPSocket): make connection attempts cancellable to unblock teardown
urrsk b940273
fix(PrimaryClient): clear sticky stop flag before deliberate reconnect
urrsk e9c46b3
fix(TCPServer): use poll() instead of select() to remove FD_SETSIZE l…
urrsk 763e77a
test(PrimaryClient): add regression test for stop() teardown during s…
urrsk 9025946
refactor(TCPSocket): express stop via SocketState instead of a boolean
urrsk 83fa37d
Merge branch 'master' into fix/rtde-reconnect-thread-blocking-destructor
urrsk 34acc54
Apply suggestions from code review
urrsk 76ea146
Refactor isStopRequested method in TCPSocket class
urrsk 4747e5f
Merge branch 'master' into fix/rtde-reconnect-thread-blocking-destructor
urfeex 2125d55
Enhance TCPServer with poll set management
urrsk af01c3f
Refactor TCP socket connection management
urrsk fd7505d
Refactor TCP socket connection calls in tests and implementation
urrsk 372c31b
Simplify tcpsocket state machine
urfeex 39165df
Set post-states on failed connect / reconnect
urfeex 2e47eaa
Early return to false in connect if socket is already connected
urfeex 7d16e85
Use block notation for cases in string conversion
urfeex 4335775
Add state graph for TCPSocket class
urfeex 1feff5f
Free file descriptor on failed connection attempts
urfeex 98ed784
Add UniqueFd class for RAII management of socket descriptors
urrsk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| <mxfile host="Electron" agent="ur_client_library"> | ||
| <diagram id="tcp_socket_states" name="TCPSocket state machine"> | ||
| <mxGraphModel dx="1417" dy="858" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="826" math="0" shadow="0"> | ||
| <root> | ||
| <mxCell id="0" /> | ||
| <mxCell id="1" parent="0" /> | ||
| <mxCell id="start" parent="1" style="ellipse;fillColor=#000000;strokeColor=#000000;html=1;" value="" vertex="1"> | ||
| <mxGeometry height="20" width="20" x="80" y="100" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="Invalid" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#a0522d;strokeColor=#6D1F00;fontSize=14;fontColor=#ffffff;" value="Invalid" vertex="1"> | ||
| <mxGeometry height="50" width="160" x="10" y="170" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="Closed" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=14;" value="Closed" vertex="1"> | ||
| <mxGeometry height="50" width="160" x="220" y="170" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="Connecting" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;fontSize=14;" value="Connecting" vertex="1"> | ||
| <mxGeometry height="50" width="160" x="220" y="300" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="Connected" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#000000;fontSize=14;" value="Connected" vertex="1"> | ||
| <mxGeometry height="50" width="160" x="340" y="450" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="LostConnection" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#000000;fontSize=14;" value="LostConnection" vertex="1"> | ||
| <mxGeometry height="50" width="160" x="220" y="590" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="Disconnecting" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#eeeeee;strokeColor=#36393d;fontSize=14;" value="Disconnecting" vertex="1"> | ||
| <mxGeometry height="50" width="160" x="600" y="450" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_start_invalid" edge="1" parent="1" source="start" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#7f7f7f;fontColor=#7f7f7f;noEdgeStyle=1;" target="Invalid" value="TCPSocket()"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_invalid_connecting" edge="1" parent="1" source="Invalid" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#1f77b4;fontColor=#1f77b4;noEdgeStyle=1;" target="Connecting" value="connect()"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_closed_connecting" edge="1" parent="1" source="Closed" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#1f77b4;fontColor=#1f77b4;noEdgeStyle=1;" target="Connecting" value="connect()"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_connecting_connected" edge="1" parent="1" source="Connecting" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#2ca02c;fontColor=#2ca02c;noEdgeStyle=1;" target="Connected" value="on_<span style="background-color: light-dark(#ffffff, var(--ge-dark-color, #121212)); color: light-dark(rgb(44, 160, 44), rgb(57, 156, 57));">success</span>"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_connecting_disconnecting" edge="1" parent="1" source="Connecting" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#d62728;fontColor=#d62728;noEdgeStyle=1;" target="Disconnecting" value="on_error, disconnect()"> | ||
| <mxGeometry relative="1" x="-0.2568" y="8" as="geometry"> | ||
| <mxPoint as="offset" /> | ||
| </mxGeometry> | ||
| </mxCell> | ||
| <mxCell id="e_connected_lost" edge="1" parent="1" source="Connected" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#8c564b;fontColor=#8c564b;noEdgeStyle=1;" target="LostConnection" value="read(): EOF or perm. error"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_connected_disconnecting" edge="1" parent="1" source="Connected" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#d62728;fontColor=#d62728;noEdgeStyle=1;" target="Disconnecting" value="disconnect()"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_lost_reconnecting" edge="1" parent="1" source="LostConnection" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#17becf;fontColor=#17becf;noEdgeStyle=1;" target="Connecting" value="reconnect()"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_lost_disconnecting" edge="1" parent="1" source="LostConnection" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#d62728;fontColor=#d62728;noEdgeStyle=1;" target="Disconnecting" value="disconnect()"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="e_disconnecting_disconnected" edge="1" parent="1" source="Disconnecting" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=classic;fontSize=11;strokeColor=#82b366;fontColor=#d62728;noEdgeStyle=1;fillColor=#d5e8d4;" target="Closed" value="<div><font style="color: rgb(151, 208, 119);">on_success</font></div>"> | ||
| <mxGeometry relative="1" x="0.0013" as="geometry"> | ||
| <mxPoint as="offset" /> | ||
| <mxPoint x="249.56985294117658" y="177" as="targetPoint" /> | ||
| </mxGeometry> | ||
| </mxCell> | ||
| <mxCell id="EPpyj3g_8WyPdl9NbQM6-1" edge="1" parent="1" source="Connecting" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;exitX=0.25;exitY=1;exitDx=0;exitDy=0;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#CC0000;" target="LostConnection" value="on_error"> | ||
| <mxGeometry relative="1" y="-30" as="geometry"> | ||
| <mxPoint as="offset" /> | ||
| </mxGeometry> | ||
| </mxCell> | ||
| </root> | ||
| </mxGraphModel> | ||
| </diagram> | ||
| </mxfile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.