Commit b940273
committed
fix(PrimaryClient): clear sticky stop flag before deliberate reconnect
reconnectStream() did stream_.close() + stream_.connect() without clearing
the sticky stop_requested_ cancellation flag introduced in
5b22c97 ("make connection attempts cancellable to unblock teardown").
PrimaryClient::stop()/~PrimaryClient() set the flag via stream_.requestStop()
so a producer thread stuck in TCPSocket::setup() aborts promptly at teardown.
The flag is sticky and only cleared on (re)start (URProducer::setupProducer,
RTDEClient::init). A deliberate reconnect via reconnectStream() never cleared
it, so after stopPrimaryClientCommunication() any resendRobotProgram() call
failed: TCPSocket::setup() bailed out at the up-front stop_requested_ check and
logged "Failed to reconnect primary stream!".
This regressed UrDriverTest.send_robot_program_retry_on_failure on every
integration runner. Clear the flag in reconnectStream() before connecting,
mirroring URProducer::setupProducer(); a deliberate reconnect is a restart and
must not honor a stale teardown cancellation.
Co-authored-by: Rune Søe-Knudsen <urrsk@users.noreply.github.com>1 parent 5b22c97 commit b940273
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
554 | 558 | | |
555 | 559 | | |
556 | 560 | | |
| |||
0 commit comments