Commit graph

2 commits

Author SHA1 Message Date
Michael Lynch
78a003767f Fix race condition in WebBleConnection
WebBleConnection's constructor calls init(), which is async. Constructors can't be async, so this means that callers who instantiate WebBleConnection can end up with it in an invalid state after construction if init() hasn't completed by the time the caller tries to access class members that depend on init.

I think the cleaner solution is to push the init() call to open(), which is async, so it can just await the results of init(), and the caller can trust that after calling open(), the connection is fully initialized.
2026-01-01 19:23:47 -05:00
liamcottle
06f8f9d4ea refactor ble connection to web ble connection 2025-04-08 13:54:25 +12:00
Renamed from src/connection/ble_connection.js (Browse further)