Skip to content

Commit 1ccfd7f

Browse files
committed
refactor: remove unused longpollerTimeout
1 parent ceb698d commit 1ccfd7f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/realtime_client/lib/src/realtime_client.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class RealtimeClient {
8888
'error': [],
8989
'message': []
9090
};
91+
92+
@Deprecated("No longer used. Will be removed in the next major version.")
9193
int longpollerTimeout = 20000;
9294
SocketStates? connState;
9395
// This is called `accessToken` in realtime-js
@@ -113,8 +115,6 @@ class RealtimeClient {
113115
///
114116
/// [decode] The function to decode incoming messages. Defaults to JSON: (payload, callback) => callback(JSON.parse(payload))
115117
///
116-
/// [longpollerTimeout] The maximum timeout of a long poll AJAX request. Defaults to 20s (double the server long poll timer).
117-
///
118118
/// [reconnectAfterMs] The optional function that returns the millsec reconnect interval. Defaults to stepped backoff off.
119119
///
120120
/// [logLevel] Specifies the log level for the connection on the server.
@@ -198,7 +198,6 @@ class RealtimeClient {
198198
connState = SocketStates.open;
199199

200200
_onConnOpen();
201-
conn!.stream.timeout(Duration(milliseconds: longpollerTimeout));
202201
conn!.stream.listen(
203202
// incoming messages
204203
(message) => onConnMessage(message as String),

packages/supabase_flutter/lib/src/realtime_cleanup_web.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ external JSFunction? supabaseFlutterWSToClose;
1212
///
1313
/// This causes old dart code that is still associated with the WebSocket
1414
/// connection to be still running and causes unexpected behavior like type
15-
/// errors and the fact that the events to the old connection may still be
15+
/// errors and the fact that the events of the old connection may still be
1616
/// logged.
1717
void markRealtimeClientToBeDisconnected(RealtimeClient client) {
1818
void disconnect() {

0 commit comments

Comments
 (0)