Skip to content

Conversation

@zhuyi2024
Copy link
Contributor

@zhuyi2024 zhuyi2024 commented Dec 2, 2025

Consumer device is not cleared on detach when there is connected provider

Copilot AI review requested due to automatic review settings December 2, 2025 09:23
@zhuyi2024 zhuyi2024 requested review from a team as code owners December 2, 2025 09:23
Copy link
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 fixes a charge failure issue when hot-plugging a dock on the same port by ensuring the consumer state is properly cleared during device detach events. The previous logic conditionally skipped consumer state updates when a provider was detached, which caused the consumer to not be cleared when it should have been.

Key changes:

  • Removed conditional logic in process_notify_detach that prevented consumer updates when a provider was detached
  • Changed to always call update_current_consumer() after removing a provider, ensuring consumer state is recalculated regardless of the detached device type

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RobertZ2011 RobertZ2011 enabled auto-merge (squash) December 2, 2025 16:40
@jerrysxie jerrysxie added the bug Something isn't working label Dec 2, 2025
@RobertZ2011 RobertZ2011 merged commit 7a7f754 into OpenDevicePartnership:main Dec 2, 2025
20 checks passed
tullom added a commit that referenced this pull request Dec 11, 2025
…595) (#630)

Mergeback commit 7a7f754 from main into
v0.2.0

Co-authored-by: zhuyi2024 <79184862@qq.com>
Co-authored-by: zhuyi <zhuyi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants