fix(#64): call wsClient.disconnect() directly in onCleared() instead of launching on cancelled scope (#94)
Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
abcec14cb5
commit
43df3c6e73
1 file changed
+1
-3
@@ -745,8 +745,6 @@ class ChatViewModel(
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
wsClient.disconnect()
|
||||
}
|
||||
wsClient.disconnect()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user