Skip to content

Remove disconnected drawing board participants - #307

Merged
auvipy merged 2 commits into
Lawouach:masterfrom
dajiaohuang:fix-drawing-board-participant-removal
Oct 4, 2026
Merged

auvipy merged 2 commits into
Lawouach:masterfrom
dajiaohuang:fix-drawing-board-participant-removal

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Disconnected drawing-board clients remain in board['handlers'] because unregister_participant checks the outer board metadata instead of the handler map. Check the handler map before removing the participant.

Fixes #306.

Added tests that import the actual example and instantiate its plugin and handlers on an isolated CherryPy bus. They cover removal without affecting another participant, the connection-close callback, and harmless repeated or unknown unregister calls. No server or monitor thread is started. Mako is included in the test requirements because the example imports it.

Validation: all three regression tests fail against the unchanged upstream implementation and pass with the fix. The complete suite passes on Linux/Python 3.12: 127 passed. The three focused tests also pass on Windows/Python 3.13.

@auvipy
auvipy self-requested a review October 3, 2026 03:35

@auvipy auvipy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please add appropriate unit tests for this change

@dajiaohuang

Copy link
Copy Markdown
Contributor Author

Added the requested unit tests for the actual drawing-board plugin, including its connection-close callback, preservation of another participant, and repeated/unknown unregister calls. All three fail on the unchanged upstream implementation and pass with this fix. The full Linux/Python 3.12 suite passes: 127 tests.

@auvipy
auvipy merged commit 21dc60e into Lawouach:master Oct 4, 2026
6 checks passed
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.

Remove disconnected participants from drawing boards

2 participants