This PR fixes #506. At least I hope so. @nadrolinux, please check.
When a server disconnection event is received and corresponding BleManager exists, the server manager will call notifyDeviceDisconnected(...), which should reset the states to STATE_DISCONNECTED and notify the requests.
Also, when the server manager was set for a BleManager, and the device is used as client (that is connect(..) is used, the manager now calls connect(..) method in the BluetoothGattServer. This should make the connection reference persistent in the server. I don't think this is necessary, as it was working before, but should work with it as well.
This PR fixes #506. At least I hope so. @nadrolinux, please check.
When a server disconnection event is received and corresponding
BleManager
exists, the server manager will callnotifyDeviceDisconnected(...)
, which should reset the states toSTATE_DISCONNECTED
and notify the requests.Also, when the server manager was set for a
BleManager
, and the device is used as client (that isconnect(..)
is used, the manager now callsconnect(..)
method in theBluetoothGattServer
. This should make the connection reference persistent in the server. I don't think this is necessary, as it was working before, but should work with it as well.