Skip to content

RDKTV-40024: Fix proper cleanup service#2100

Open
SatheeshkumarG15 wants to merge 2 commits intomasterfrom
fix/Proper_CleanupService
Open

RDKTV-40024: Fix proper cleanup service#2100
SatheeshkumarG15 wants to merge 2 commits intomasterfrom
fix/Proper_CleanupService

Conversation

@SatheeshkumarG15
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 22, 2026 10:19
@sramani-metro sramani-metro requested a review from sebaszm April 22, 2026 10:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves connection/service cleanup in Thunder’s daemon runtime by centralizing channel-to-service detachment logic and making it idempotent, preventing double-cleanup paths during socket close/destruction.

Changes:

  • Introduce Server::Channel::CleanupService() to consolidate Unsubscribe/Detach/Release for _service.
  • Ensure cleanup is executed in both StateChange() close handling and ~Channel() without double-invocation by guarding via an atomic flag.
  • Add initialization for the new cleanup guard in PluginServer.cpp.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Source/Thunder/PluginServer.h Adds CleanupService() and an atomic “cleanup-once” guard; updates close path to call the helper.
Source/Thunder/PluginServer.cpp Initializes _serviceCleanedUp and updates the channel destructor to use CleanupService().

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.

2 participants