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 BaseGattProxyBearer there is no implementation of centralManager(_:didFailToConnect:error:). This means that when a connection to the device fails (as it did in my case with a "MIC failure") and when using the GattBearer class, my logic got stuck as neither bearerDidOpen(_ bearer: Bearer) nor bearer(_ bearer: Bearer, didClose error: Error?) were ever called. Only by eventually manually implementing the didFailToConnect method in a class extending GattBearer and after a lot of trial and error did I see why the connection got stuck.
I am not sure if such an error should call the didClose callback, but I think it would be reasonable if BaseGattProxyBearer provided a default implementation that logs the error. If not, then GattBearer should at least mention that it is expected that code using the library handles certain callbacks itself.