Skip to content

fix(ble): offer one WiFi upgrade path at a time when receiving - #102

Merged
asulwer merged 1 commit into
masterfrom
fix/ble-receive-one-upgrade-offer
Nov 6, 2026
Merged

asulwer merged 1 commit into
masterfrom
fix/ble-receive-one-upgrade-offer

Conversation

@asulwer

@asulwer asulwer commented Nov 6, 2026

Copy link
Copy Markdown
Owner

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.

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.
@asulwer
asulwer merged commit 708cd5a into master Nov 6, 2026
9 of 10 checks passed
@asulwer
asulwer deleted the fix/ble-receive-one-upgrade-offer branch November 6, 2026 19:35
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.

1 participant