client: unconfirmed sends are visible and recovered; watchdog for a dead connection #123
Loading…
Reference in a new issue
No description provided.
Delete branch "void/resume-reload"
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?
Why messages looked sent and vanished (no PUT /send reached the server, rooms unencrypted): matrix-js-sdk adds a local echo on sendMessage and the timeline drew it like a delivered message at every status; sends have no timeout (sync polls do), so on a dead/half-open connection a send hangs SENDING with no request out; a reload drops the echo.
Soul passes: three; findings applied. Not covered: uploads/edits in flight are lost on the watchdog reload; Resend of a slow send can duplicate; two tabs can resend the same entry; plaintext drafts in localStorage. The 20s threshold is a trade-off for the operator.
🤖 Generated with Claude Code
Sends have no timeout and sync polls do, so a dead connection leaves a send SENDING forever with no request reaching the server while its echo looked delivered. A watchdog (send pending past 20 s, sync ERROR/STOPPED for 30 s) calls a guarded reload; what the reload interrupts is sent again under its own txn id. Uploads and stickers go through the outbox. Resend takes a fresh txn id while the SDK still holds the failed echo. The resume-sync recovery no longer calls stopClient/startClient, which closes the rust crypto for good ("null pointer passed to rust" on later encrypted sends). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>