fix(llc): channel clean up after dispose from cache (#1342)
* fix: channel clean up after dispose from cache * chore(llc): update changelog * fix(llc): refactor setter in add/remove methods * fix tests Co-authored-by: Salvatore Giordano <[email protected]>
This commit is contained in:
co-authored by
Salvatore Giordano
parent
25bc504125
commit
37e01b118b
@@ -1237,7 +1237,7 @@ class Channel {
|
||||
state = ChannelClientState(this, channelState);
|
||||
|
||||
if (cid != null) {
|
||||
client.state.channels = {cid!: this};
|
||||
client.state.addChannels({cid!: this});
|
||||
}
|
||||
if (!_initializedCompleter.isCompleted) {
|
||||
_initializedCompleter.complete(true);
|
||||
@@ -1544,6 +1544,7 @@ class Channel {
|
||||
|
||||
/// Call this method to dispose the channel client.
|
||||
void dispose() {
|
||||
client.state.removeChannel('$cid');
|
||||
state?.dispose();
|
||||
_keyStrokeHandler.cancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user