You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In gap_linux.go, you cannot recover from a panic made within the callback to adapter.Scan().
If you attempt to recover from a panic, and re-call Scan() after the recovery, a.adapter.Call("org.bluez.Adapter1.StartDiscovery", 0).Err returns an Operation already in progress error.
It looks like cancelChan was meant to be used to call a.adapter.Call("org.bluez.Adapter1.StopDiscovery", 0), but if the callback panics, the channel is never consumed, so the call to stop the discovery is never sent. This leads to the above error when attempting to rescan.
The text was updated successfully, but these errors were encountered:
I think I am seeing something related to this too, where sometimes I get the same "Operation already in progress" error and I can't seem to get out of that error state without restarting the bluetooth service or my application.
In
gap_linux.go
, you cannot recover from a panic made within the callback toadapter.Scan()
.If you attempt to recover from a panic, and re-call Scan() after the recovery,
a.adapter.Call("org.bluez.Adapter1.StartDiscovery", 0).Err
returns anOperation already in progress
error.It looks like
cancelChan
was meant to be used to calla.adapter.Call("org.bluez.Adapter1.StopDiscovery", 0)
, but if the callback panics, the channel is never consumed, so the call to stop the discovery is never sent. This leads to the above error when attempting to rescan.The text was updated successfully, but these errors were encountered: