Skip to content

Remove invalid asserts from WslMirroredNetworking.cpp#14151

Merged
OneBlue merged 1 commit intomasterfrom
user/oneblue/remove-assert-2
Feb 4, 2026
Merged

Remove invalid asserts from WslMirroredNetworking.cpp#14151
OneBlue merged 1 commit intomasterfrom
user/oneblue/remove-assert-2

Conversation

@OneBlue
Copy link
Collaborator

@OneBlue OneBlue commented Feb 3, 2026

Summary of the Pull Request

This change removes two invalid asserts from src/windows/service/exe/WslMirroredNetworking.cpp

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

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 removes two invalid assertions from WslMirroredNetworking.cpp that were checking for State::Started in callback functions. These assertions were invalid because callbacks can fire during shutdown after the state has been set to State::Stopped but before the callbacks are unregistered, creating a race condition. The code already handles this correctly by checking for State::Stopped immediately after the assertions and returning early.

Changes:

  • Removed invalid WI_ASSERT(manager->m_state == State::Started) from HcnServiceConnectionTimerCallback
  • Removed invalid WI_ASSERT(manager->m_state == State::Started) from HcnCallback

@OneBlue OneBlue merged commit 404aec6 into master Feb 4, 2026
12 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.

4 participants