Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1dd0e254c | ||
|
|
58625c86b0 | ||
|
|
e3ac9a96d6 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@lotusguild/element-call-embedded",
|
||||
"version": "0.25.0-lotus.23",
|
||||
"version": "0.25.0-lotus.24",
|
||||
"files": [
|
||||
"README.md",
|
||||
"LICENSE-AGPL-3.0",
|
||||
|
||||
@@ -868,16 +868,19 @@ export function enterRTCSession(
|
||||
};
|
||||
}
|
||||
|
||||
// Calculates `maximumNetworkErrorRetryCount`. The connection is failed if EITHER:
|
||||
// - The /sync loop is unresponsive for > `gracePeriod` ms, or
|
||||
// - A delayed leave event is emitted (after `leaveDelay` ms period).
|
||||
// Note: Use leaveDelay >> gracePeriod for delegated leave events.
|
||||
// Calculates `maximumNetworkErrorRetryCount`: enough retries to outlast the
|
||||
// server's delayed-leave window (see [lotus #46] below).
|
||||
const gracePeriod = Config.get().sync_disconnect_grace_period_ms;
|
||||
const leaveDelay = matrixRtcSessionConfig?.delayed_leave_event_delay_ms;
|
||||
const retryInterval = matrixRtcSessionConfig?.network_error_retry_ms;
|
||||
|
||||
// Math.min is used to account for the respective worst case: /sync not available or leave event emitted.
|
||||
const maxWaitTime = Math.min(gracePeriod, leaveDelay);
|
||||
// [lotus #46] Keep retrying for as long as the homeserver itself would keep
|
||||
// our membership: until its delayed leave fires (`leaveDelay`). Capping at
|
||||
// the 10 s sync grace period made a ~20–35 s homeserver stall end everyone's
|
||||
// call ("Connection lost") even with a 60 s server-side leave delay. The
|
||||
// embedded call has no /sync loop of its own, so the grace period doesn't
|
||||
// describe anything it can observe.
|
||||
const maxWaitTime = Math.max(gracePeriod, leaveDelay);
|
||||
const maximumNetworkErrorRetryCount =
|
||||
Math.ceil(maxWaitTime / retryInterval) + 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user