Re: [web-bluetooth] How to properly abort a `device.gatt.connect()` attempt (#640)

It think the timeout would be sufficient for our use case. (It might be nice if the `DomError` in the rejected promise had name of `TimeoutError` on all platforms in this case)

https://github.com/pybricks/support/issues/911 has a useful test to reproduce the issue (this was on Linux). It can be generalized as:

- Click a UI button that invokes `requestDevice()` to open the device picker popup.
- Have a device advertise so that it shows up in the list.
- Select the device, but don't click the Pair button yet.
- Turn off the device so that connection is not possible.
- Click the Pair button.
- The promise never resolves, so you have to reload the page.


-- 
GitHub Notification of comment by dlech
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/640#issuecomment-3398748526 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 13 October 2025 19:15:41 UTC