Workaround to fetch all the pending toDevice events from a Synapse homeserver #4612
Labels
A-Performance
A-Sync
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Major
Severely degrades major functionality or product features, with no satisfactory workaround
Due to a bug on Synapse, the Android Matrix SDK can receive toDevice events with a long delay: 30s max if nothing else (new message, etc.) triggers a sync response to be sent.
The workaround implemented on some clients is to set the timeout parameter of the sync request to 0 if the previous sync response contains some toDevice events, to force Synapse to send all the pending toDevice events, if any, immediately.
Once matrix-org/synapse#11457 will be fixed, the workaround could be removed. But I think it's still worth to implement it, because once fixed it can take time for the Synapse fix to be deployed on all the Synapse instances in the wild. Also we do not have any due date for the Synapse fix.
Note: the Android Matrix SDK is managing the sync requests, so implementing this will still be useful once we will use the Crypto Rust SDK.
The text was updated successfully, but these errors were encountered: