Skip to content

Commit 2738dad

Browse files
benjaminfruehbackportbot[bot]
authored andcommitted
Fix: prevent the collision between y-websocket and polling interval by handling the timing more gracefully
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
1 parent 1d7ceb7 commit 2738dad

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/services/PollingBackend.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const FETCH_INTERVAL_READ_ONLY = 30000
4040
*
4141
* @type {number} time in ms
4242
*/
43-
const FETCH_INTERVAL_INVISIBLE = 30000
43+
const FETCH_INTERVAL_INVISIBLE = 20000
4444

4545
const FETCH_INTERVAL_NOTIFY = 30000
4646

‎src/services/y-websocket.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ messageHandlers[messageAuth] = (
134134
}
135135

136136
// @todo - this should depend on awareness.outdatedTime
137-
const messageReconnectTimeout = 30000
137+
const messageReconnectTimeout = 40000
138138

139139
/**
140140
* @param {WebsocketProvider} provider

0 commit comments

Comments
 (0)