You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -265,6 +272,7 @@ export class WebsocketProvider extends ObservableV2 {
265
272
* @param {typeof WebSocket} [opts.WebSocketPolyfill] Optionall provide a WebSocket polyfill
266
273
* @param {number} [opts.resyncInterval] Request server state every `resyncInterval` milliseconds
267
274
* @param {number} [opts.maxBackoffTime] Maximum amount of time to wait before trying to reconnect (we try to reconnect using exponential backoff)
275
+
* @param {number} [opts.minRetryInterval] Minimum mount of time to wait between reconnects if the previous connection succeeded but got closed right after.
268
276
* @param {boolean} [opts.disableBc] Disable cross-tab BroadcastChannel communication
269
277
*/
270
278
constructor(serverUrl,roomname,doc,{
@@ -275,6 +283,7 @@ export class WebsocketProvider extends ObservableV2 {
275
283
WebSocketPolyfill =WebSocket,
276
284
resyncInterval =-1,
277
285
maxBackoffTime =2500,
286
+
minRetryInterval =2500,
278
287
disableBc =false
279
288
}={}){
280
289
super()
@@ -285,6 +294,7 @@ export class WebsocketProvider extends ObservableV2 {
285
294
this.serverUrl=serverUrl
286
295
this.bcChannel=serverUrl+'/'+roomname
287
296
this.maxBackoffTime=maxBackoffTime
297
+
this.minRetryInterval=minRetryInterval
288
298
/**
289
299
* The specified url parameters. This can be safely updated. The changed parameters will be used
290
300
* when a new connection is established.
@@ -301,6 +311,7 @@ export class WebsocketProvider extends ObservableV2 {
0 commit comments