Skip to content

Commit 94cc695

Browse files
authored
fix(llc): fix failed to execute 'close' on 'WebSocket' (#2120)
1 parent 78a6a99 commit 94cc695

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/stream_chat/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
🐞 Fixed
44

5+
- [[#1774]](https://github.com/GetStream/stream-chat-flutter/issues/1774) Fixed failed to execute 'close' on 'WebSocket'.
56
- [[#2016]](https://github.com/GetStream/stream-chat-flutter/issues/2016) Fix muted channel's unreadCount incorrectly updated.
67

78
## 9.4.0

packages/stream_chat/lib/src/ws/websocket.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ class WebSocket with TimerHelper {
120120
_logger?.info('Closing connection with $baseUrl');
121121
if (_webSocketChannel != null) {
122122
_unsubscribeFromWebSocketChannel();
123-
_webSocketChannel?.sink
124-
.close(_manuallyClosed ? status.normalClosure : status.goingAway);
123+
_webSocketChannel?.sink.close(status.normalClosure, 'Closing connection');
125124
_webSocketChannel = null;
126125
}
127126
}

0 commit comments

Comments
 (0)