feat: Add shutdown handler for client to call and close alive sockets#194
Merged
bjsowa merged 4 commits intoRobotWebTools:ros2from Feb 19, 2026
Merged
Conversation
241cad5 to
07fcdd9
Compare
Contributor
Author
|
tested with |
Member
|
Sorry for the lack of response. This looks overall good but I recently refactored the project and changed the structure a lot so the changes can't be applied as is. Could you resolve the conflicts or just rewrite the PR for the new structure? |
varunverlencar
pushed a commit
to varunverlencar/web_video_server
that referenced
this pull request
Feb 17, 2026
…bTools#193) Implements the feature requested in issue RobotWebTools#193: a client-callable HTTP endpoint that gracefully closes alive MJPEG/stream connections server-side, preventing lingering TCP sockets when UI components unmount. Changes: - StreamerInterface: add virtual stop() (no-op default) and get_client_id() - StreamerBase: implement stop() (marks inactive, releases connection) and get_client_id(); populate client_id_ from 'client_id' query param - WebVideoServer: register /shutdown route and implement handle_shutdown() which stops all streams for a topic, or a single named stream if client_id is provided; returns plain-text 'stopped=<count>' - README: document /shutdown endpoint, parameters, and client_id usage Rewrite of PR RobotWebTools#194 adapted to the pluginlib-based architecture introduced in RobotWebTools#192 and the naming/style conventions enforced by RobotWebTools#195. https://claude.ai/code/session_01F5w6Gj9PefGAEoHz9SS5Wt
…bTools#193) Implements the feature requested in issue RobotWebTools#193: a client-callable HTTP endpoint that gracefully closes alive MJPEG/stream connections server-side, preventing lingering TCP sockets when UI components unmount. Changes: - StreamerInterface: add virtual stop() (no-op default) and get_client_id() - StreamerBase: implement stop() (marks inactive, releases connection) and get_client_id(); populate client_id_ from 'client_id' query param - WebVideoServer: register /shutdown route and implement handle_shutdown() which stops all streams for a topic, or a single named stream if client_id is provided; returns plain-text 'stopped=<count>' - README: document /shutdown endpoint, parameters, and client_id usage Rewrite of PR RobotWebTools#194 adapted to the pluginlib-based architecture introduced in RobotWebTools#192 and the naming/style conventions enforced by RobotWebTools#195.
07fcdd9 to
e61d3fb
Compare
Contributor
Author
|
@bjsowa made a clean rewrite, also curious to see how good claude was. lets see |
bjsowa
requested changes
Feb 19, 2026
make pure virtual Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
make pure virtual Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
bjsowa
approved these changes
Feb 19, 2026
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.
Add TCP port socket shutdown if not alive
Public API Changes
Add shutdown handler for clients /shutdown
Description
#193