Custom timeout for delayed event restarts #4921
Open
+46
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(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
public
/exported
symbols have accurate TSDoc documentation.