Skip to content

Commit 564b4c9

Browse files
committed
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 177bbb9 commit 564b4c9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/services/PollingBackend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const FETCH_INTERVAL_READ_ONLY = 30000
4343
* when a browser window is considered invisible by the page visibility API
4444
* https://developer.mozilla.org/de/docs/Web/API/Page_Visibility_API
4545
*/
46-
const FETCH_INTERVAL_INVISIBLE = 30000
46+
const FETCH_INTERVAL_INVISIBLE = 20000
4747

4848
const FETCH_INTERVAL_NOTIFY = 30000
4949

src/services/y-websocket.js

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

131131
// @todo - this should depend on awareness.outdatedTime
132-
const messageReconnectTimeout = 30000
132+
const messageReconnectTimeout = 40000
133133

134134
/**
135135
* @param {WebsocketProvider} provider

0 commit comments

Comments
 (0)