Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Version used: 1.0.0-alpha02
Devices/Android versions reproduced on: Pixel 8 Pro
In GattClient you use:
```
awaitClose {
launch {
unregisterSubscribeListener(characteristic.fwkCharacteristic)
}
...
}
```
which is not executed when the flow is cancelled. This leads to the issue that you can't resubscribe to the same characteristic within the same connection as an ` throw IllegalStateException("already subscribed")` is thrown.
I can see the log that the characteristic notification is set to false, but internally your state is not clean, as the job is cancelled prematurely before the listener is removed.