Skip to content

Reconnect both roles of a topic that publishes and subscribes - #163

Closed
huhumeng2 wants to merge 1 commit into
RobotWebTools:mainfrom
huhumeng2:fix/topic-dual-role-reconnect
Closed

huhumeng2 wants to merge 1 commit into
RobotWebTools:mainfrom
huhumeng2:fix/topic-dual-role-reconnect

Conversation

@huhumeng2

Copy link
Copy Markdown

A Topic that both subscribes and advertises overwrites its one saved connection message and registers duplicate close hooks. Reconnection restores only the last role; removing either role can also remove reconnection for the remaining role. This addresses the dual-role reconnect behavior described in #114.

Track active connection messages by operation and register one close hook per topic. Remove only the cancelled role and replay the roles still active when the delayed reconnect runs. Regressions cover both role orders, hook registration, removing either role and cancelling both while reconnect is pending.

Validation: Four regression cases fail on the base revision and all 5 pass after the fix. With existing transport/header tests, Twisted passes 9 tests (3 skipped) and asyncio passes 11 tests (1 skipped). No live ROS bridge or robot was used.

AI-assisted implementation and tests; the failures and passing results above were reproduced locally.

@huhumeng2 huhumeng2 closed this Oct 9, 2026
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.

1 participant