bug: Incorrect handling of /sync?since=<batch_token> request when the timeout parameter is omitted. #2462
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2462
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is the bug?
When the
/sync?since=<batch_token>request is made without thetimeoutparameter, it results in a 30‑second timeout instead of an immediate response, as mandated by The Matrix documentation at https://spec.matrix.org/latest/client-server-api/#syncing:"
timeout
By default, this is 0, so the server will return immediately even if the response is empty.
"
Steps to reproduce
Server name and version
continuwuity 26.9.1 (
0727d564a)Additional context
No response
This block needs to check if the timeout is
Noneor zero in addition to checking if the request is full state or empty:let response = build_sync_events(&services, &body).await?;if body.body.full_state|| !(response.rooms.is_empty()&& response.presence.is_empty()&& response.account_data.is_empty()&& response.device_lists.is_empty()&& response.to_device.is_empty()){return Ok(response);}