We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f3066b commit d26e1d5Copy full SHA for d26e1d5
packages/supabase_flutter/lib/src/supabase.dart
@@ -206,8 +206,13 @@ class Supabase with WidgetsBindingObserver {
206
authOptions: authOptions,
207
accessToken: accessToken,
208
);
209
- disconnectPreviousRealtimeClient();
210
- markRealtimeClientToBeDisconnected(client.realtime);
+
+ // Close any previous realtime client that may still be connected due to
211
+ // flutter web hot-restart.
212
+ if (kDebugMode) {
213
+ disconnectPreviousRealtimeClient();
214
+ markRealtimeClientToBeDisconnected(client.realtime);
215
+ }
216
_widgetsBindingInstance?.addObserver(this);
217
_initialized = true;
218
}
0 commit comments