On 2026-11-14 14:17 a relayed message was dropped with "⚠ Your message may not have been bridged: … net/http: TLS handshake timeout". Upstream mautrix-discord v0.7.7 sends once and never retries.
Change
discord-bridge/patches/0001-…patch: wraps the webhook and user-session send in lotusRetrySend. It retries only errors that happen before the request is written (DNS, dial, TLS handshake timeout, proxy connect), with backoff 2/5/10/20/30/60/60/60 s (~4 min). Retries run inline in the room's event loop, so later messages queue in order. Errors after send (read timeouts, resets, Discord 5xx/REST errors) are not retried, since webhook sends have no dedupe and could duplicate. Attachment readers are rewound between attempts. Unit tests included.
discord-bridge/build-patched.sh: clones the tag, applies patches, runs the tests, builds with cgo against libolm (LXC 151 has libolm3). Deploy steps in its header.
README: documents the patched build and that install.sh still installs stock.
Already deployed
Built with go1.26.6 and deployed to LXC 151 at 14:26 (sha256 3625c096…70d1). Stock binary kept as /opt/mautrix-discord/mautrix-discord.bak-20261114-stock-v0.7.7. The bridge reconnected to the Discord gateway within 1 s. Only the pre-existing room name/topic 403s appear in the log.
On 2026-11-14 14:17 a relayed message was dropped with "⚠ Your message may not have been bridged: … net/http: TLS handshake timeout". Upstream mautrix-discord v0.7.7 sends once and never retries.
## Change
- `discord-bridge/patches/0001-…patch`: wraps the webhook and user-session send in `lotusRetrySend`. It retries only errors that happen **before** the request is written (DNS, dial, TLS handshake timeout, proxy connect), with backoff 2/5/10/20/30/60/60/60 s (~4 min). Retries run inline in the room's event loop, so later messages queue in order. Errors after send (read timeouts, resets, Discord 5xx/REST errors) are not retried, since webhook sends have no dedupe and could duplicate. Attachment readers are rewound between attempts. Unit tests included.
- `discord-bridge/build-patched.sh`: clones the tag, applies patches, runs the tests, builds with cgo against libolm (LXC 151 has `libolm3`). Deploy steps in its header.
- README: documents the patched build and that `install.sh` still installs stock.
## Already deployed
Built with go1.26.6 and deployed to LXC 151 at 14:26 (sha256 `3625c096…70d1`). Stock binary kept as `/opt/mautrix-discord/mautrix-discord.bak-20261114-stock-v0.7.7`. The bridge reconnected to the Discord gateway within 1 s. Only the pre-existing room name/topic 403s appear in the log.
Not covered: edits, reactions, redactions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
Upstream mautrix-discord v0.7.7 sends each message once; a momentary
"net/http: TLS handshake timeout" dropped a message on 2026-11-14 with
only a "may not have been bridged" notice. Patch 0001 retries pre-send
network failures (DNS, dial, TLS handshake) with backoff (~4 min budget),
inline in the per-room loop so order is kept. Post-send failures are not
retried to avoid duplicate webhook posts.
Adds the patch, build-patched.sh (clone tag, apply, test, cgo build
against libolm) and README notes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared
merged commit c2ffb8907d into main2026-11-14 14:31:24 -05:00
jared
deleted branch discord-bridge-send-retry2026-11-14 14:31:24 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On 2026-11-14 14:17 a relayed message was dropped with "⚠ Your message may not have been bridged: … net/http: TLS handshake timeout". Upstream mautrix-discord v0.7.7 sends once and never retries.
Change
discord-bridge/patches/0001-…patch: wraps the webhook and user-session send inlotusRetrySend. It retries only errors that happen before the request is written (DNS, dial, TLS handshake timeout, proxy connect), with backoff 2/5/10/20/30/60/60/60 s (~4 min). Retries run inline in the room's event loop, so later messages queue in order. Errors after send (read timeouts, resets, Discord 5xx/REST errors) are not retried, since webhook sends have no dedupe and could duplicate. Attachment readers are rewound between attempts. Unit tests included.discord-bridge/build-patched.sh: clones the tag, applies patches, runs the tests, builds with cgo against libolm (LXC 151 haslibolm3). Deploy steps in its header.install.shstill installs stock.Already deployed
Built with go1.26.6 and deployed to LXC 151 at 14:26 (sha256
3625c096…70d1). Stock binary kept as/opt/mautrix-discord/mautrix-discord.bak-20261114-stock-v0.7.7. The bridge reconnected to the Discord gateway within 1 s. Only the pre-existing room name/topic 403s appear in the log.Not covered: edits, reactions, redactions.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA