Repository navigation
fix(ble): offer one WiFi upgrade path at a time when receiving - #102
Merged
Merged
Conversation
A phone that sends over BLE drops its WiFi while the send sheet is open, then rejoins its network once the transfer starts. We offered it WIFI_LAN and WIFI_HOTSPOT back to back. The phone took the LAN path, released the BLE channel, then got the hotspot offer, which google/nearby refuses while WIFI_LAN is up, and closed the LAN socket before sending a byte. Every such receive ended as an unexpected disconnection. Offer WIFI_LAN first and the hotspot only when the phone answers with UPGRADE_FAILURE for the LAN path, which it already sends when it can't reach us there. Without a LAN address the hotspot is offered straight away, as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A phone that sends over BLE drops its WiFi while the send sheet is open, then rejoins its network once the transfer starts. We offered it WIFI_LAN and WIFI_HOTSPOT back to back. The phone took the LAN path, released the BLE channel, then got the hotspot offer, which google/nearby refuses while WIFI_LAN is up, and closed the LAN socket before sending a byte. Every such receive ended as an unexpected disconnection.
Offer WIFI_LAN first and the hotspot only when the phone answers with UPGRADE_FAILURE for the LAN path, which it already sends when it can't reach us there. Without a LAN address the hotspot is offered straight away, as before.