Skip to content

Custom timeout for delayed event restarts #4921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: fkwp/matrixrtc/delayed_event_reset_timeout
Choose a base branch
from

Conversation

toger5
Copy link
Contributor

@toger5 toger5 commented Jul 15, 2025

(alternative to: #4896)

This PR introduces a new setting delayedEventRestartLocalTimeoutMS.

This setting is used in the context of MatrixRTC. We need to restart the dealyed events to make sure
the HomeServer is sending the delayed rtc leave event. In bad network environments we might end up
waiting for too long for the event to arrive and we will not send another restart event until the local timeout is reached.

In those scenarios chances for success are higher if we use a lower local timeout to increase the tries we do instead of waiting
for responses on requests which are stuck.

It also sets the default value for it to: 2300 which works well.

The reason why we make this a global configuration instead of sth we pass through via the requestOptions as it is done in: #4896 is because of how Element Call is implemented.

In SPA mode we can control where we send POST /_matrix/client/v1/delayed_events/{delay_id}. But in widget mode we cannot configure the exact call to the enpoint. The widget driver will just use the raw function.

Delayed event restarts in general are a very cheap server operation. So a smaller timeout in every case seems appropriate.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

@toger5 toger5 marked this pull request as ready for review July 15, 2025 15:22
@toger5 toger5 requested a review from a team as a code owner July 15, 2025 15:22
@toger5 toger5 requested review from florianduros and MidhunSureshR and removed request for a team July 15, 2025 15:22
@toger5 toger5 requested a review from a team as a code owner July 17, 2025 14:00
@toger5 toger5 requested review from AndrewFerr and removed request for a team July 17, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant