You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running as a Connector, restarting the watcher will sometimes fail.
To Reproduce
Steps to reproduce the behavior:
Run the WiFiDirect C# sample.
Select Connector
Click Start Watcher
Do some connection testing
Click Stop Watcher
Click Start Watcher
It randomly fails. When it fails, the WiFiDirectAdvertisementPublisher is still in Started state when Start() is called.
Expected behavior
It should always be possible to stop/restart the watcher.
Configuration
Language/architecture/flavor: C#
Windows platform and build number: Windows 11, various
Visual Studio version: Various, currently 17.4.4
Additional context
Workarounds are:
If the WiFiDirectAdvertisementPublisher isn't in Stopped, Created or Aborted state when going to start it, call Stop() then create a new WiFiDirectAdvertisementPublisher.
Don't bother stopping the WiFiDirectAdvertisementPublisher when stopping/starting the watcher. This certainly seems to work, but what is the WiFiDirectAdvertisementPublisher doing in this case? Is it responsible for sending out the ProbeRequests? If so, it would seem to be harmless leaving it around as ProbeRequests only get sent for 5 seconds(!) after starting the DeviceWatcher.
It is likely this is an OS problem, but it's out in the wild and apps can't rely on it being fixed. Therefore the samples should workaround it.
The text was updated successfully, but these errors were encountered:
Which sample are you reporting a bug in?
WiFi Direct
Describe the bug
When running as a Connector, restarting the watcher will sometimes fail.
To Reproduce
Steps to reproduce the behavior:
It randomly fails. When it fails, the WiFiDirectAdvertisementPublisher is still in Started state when Start() is called.
Expected behavior
It should always be possible to stop/restart the watcher.
Configuration
Additional context
Workarounds are:
It is likely this is an OS problem, but it's out in the wild and apps can't rely on it being fixed. Therefore the samples should workaround it.
The text was updated successfully, but these errors were encountered: