Skip to content

Use Windows list manager events#3829

Open
edde746 wants to merge 1 commit into
fluttercommunity:mainfrom
edde746:fix/windows-connectivity-listener
Open

Use Windows list manager events#3829
edde746 wants to merge 1 commit into
fluttercommunity:mainfrom
edde746:fix/windows-connectivity-listener

Conversation

@edde746
Copy link
Copy Markdown

@edde746 edde746 commented May 18, 2026

Summary

  • Subscribe to IID_INetworkListManagerEvents on Windows and implement ConnectivityChanged.
  • Clean up partial listener state after failed setup and preserve the HRESULT for useful errors.

Why

INetworkListManagerEvents is the documented sink for machine-level connectivity changes. The previous IID_INetworkEvents subscription can fail during EventChannel activation and surface as PlatformException(NetworkManager::StartListen).

Fixes #3713.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@github-actions
Copy link
Copy Markdown

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Use Windows list manager events". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

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.

[Bug]: PlatformException: NetworkManager::StartListen when using onConnectivityChanged on Windows

1 participant