From 02d8826fa178fa814ea57d1e6ee3c35f34073589 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Fri, 9 Aug 2024 21:28:59 -0700 Subject: [PATCH] Correct close code --- lib/screens/channel/chat/stores/chat_store.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/screens/channel/chat/stores/chat_store.dart b/lib/screens/channel/chat/stores/chat_store.dart index c9dcf49d..078fa272 100644 --- a/lib/screens/channel/chat/stores/chat_store.dart +++ b/lib/screens/channel/chat/stores/chat_store.dart @@ -166,7 +166,7 @@ abstract class ChatStoreBase with Store { reactions.add( reaction( (_) => auth.isLoggedIn, - (_) => _channel?.sink.close(1001), + (_) => _channel?.sink.close(1000), ), ); @@ -404,7 +404,7 @@ abstract class ChatStoreBase with Store { ), ); - _sevenTVChannel?.sink.close(1001); + _sevenTVChannel?.sink.close(1000); _sevenTVChannel = WebSocketChannel.connect(Uri.parse('wss://events.7tv.io/v3')); @@ -463,7 +463,7 @@ abstract class ChatStoreBase with Store { @action void connectToChat() { - _channel?.sink.close(1001); + _channel?.sink.close(1000); _channel = WebSocketChannel.connect(Uri.parse('wss://irc-ws.chat.twitch.tv:443')); @@ -684,11 +684,11 @@ abstract class ChatStoreBase with Store { _notificationTimer?.cancel(); sleepTimer?.cancel(); - _sevenTVChannel?.sink.close(1001); + _sevenTVChannel?.sink.close(1000); _sevenTVChannel = null; _sevenTVChannelListener?.cancel(); - _channel?.sink.close(1001); + _channel?.sink.close(1000); _channel = null; _channelListener?.cancel();