mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Fix autobug: some BLE implementations might not be completed
with service enumeration by the time they call the discover services callback. Therefore be careful to not touch "service" until after the 500ms delay everyone on stackoverflow says these buggy drivers need.
This commit is contained in:
parent
a201de649c
commit
b194659e8a
1 changed files with 1 additions and 1 deletions
|
|
@ -376,7 +376,7 @@ class RadioInterfaceService : Service(), Logging {
|
|||
// FIXME - no need to discover services more than once - instead use lazy() to use them in future attempts
|
||||
safe!!.asyncDiscoverServices { discRes ->
|
||||
discRes.getOrThrow() // FIXME, instead just try to reconnect?
|
||||
debug("Discovered services! Service size=${service.characteristics.size}")
|
||||
debug("Discovered services!")
|
||||
|
||||
// we begin by setting our MTU size as high as it can go
|
||||
safe!!.asyncRequestMtu(512) { mtuRes ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue