-
Notifications
You must be signed in to change notification settings - Fork 139
v5 sync takes 5s when no new events #402
Copy link
Copy link
Closed
Description
When I open Element X, it says "Sync..." for around 5s.
Investigation
curl -s -X POST "http://localhost:8008/_matrix/client/unstable/org.matrix.simplified_msc3575/sync?timeout=0" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"lists":{}}'
# timeout=0 -> Returns in 5s
# timeout=100 -> Returns in 5s
# timeout=6000 -> Returns in 6s
# timeout none -> Returns in ~12ms
#
# same empty {"pos":"..."} responseWhen using v3 (curl -s "http://localhost:8008/_matrix/client/v3/sync?timeout=100" -H "Authorization: Bearer $TOKEN"), it returns in ~12ms. Probably v3 checks for additional types of events -> they are present -> no waiting.
Conclusion: sync ignores the timeout parameter if it is less than 5s.
Environment: tuwunel v1.5.1, Element Pro v26.03.3 (61)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels