File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
packages/supabase_flutter/lib/src Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11import 'package:supabase_flutter/supabase_flutter.dart' ;
22
3- void markRealtimeClientToBeDisconnected (SupabaseClient client) {}
3+ void markClientToDispose (SupabaseClient client) {}
44
5- void disconnectPreviousRealtimeClient () {}
5+ void disposePreviousClient () {}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ external JSFunction? supabaseFlutterWSToClose;
1414/// connections to be still running and causes unexpected behavior like type
1515/// errors and the fact that the events of the old connection may still be
1616/// logged.
17- void markRealtimeClientToBeDisconnected (SupabaseClient client) {
17+ void markClientToDispose (SupabaseClient client) {
1818 void disconnect () {
1919 client.realtime.disconnect (
2020 code: 1000 , reason: 'Closed due to Flutter Web hot-restart' );
@@ -27,8 +27,8 @@ void markRealtimeClientToBeDisconnected(SupabaseClient client) {
2727/// Disconnect the previous [SupabaseClient] if it exists.
2828///
2929/// This is done by calling the function stored by
30- /// [markRealtimeClientToBeDisconnected ] from the js context
31- void disconnectPreviousRealtimeClient () {
30+ /// [markClientToDispose ] from the js context
31+ void disposePreviousClient () {
3232 if (supabaseFlutterWSToClose != null ) {
3333 supabaseFlutterWSToClose! .callAsFunction ();
3434 supabaseFlutterWSToClose = null ;
Original file line number Diff line number Diff line change @@ -210,8 +210,8 @@ class Supabase with WidgetsBindingObserver {
210210 // Close any previous realtime client that may still be connected due to
211211 // flutter web hot-restart.
212212 if (kDebugMode) {
213- disconnectPreviousRealtimeClient ();
214- markRealtimeClientToBeDisconnected (client);
213+ disposePreviousClient ();
214+ markClientToDispose (client);
215215 }
216216 _widgetsBindingInstance? .addObserver (this );
217217 _initialized = true ;
You can’t perform that action at this time.
0 commit comments