One reconnect failure stops all mailboxes ai:claude-sonnet-5-5 #49

Open
opened 2026-10-24 09:14:31 +02:00 by heiko · 0 comments
Owner

Priority: minor

Found by a 100 Go Mistakes review (robustness / #62 goroutine lifecycle). Verified by reading the code.

Where: internal/app/app.go:539-543 (RunMailbox), internal/app/app.go:612-660 (Run)

Problem: client.Reconnect is attempted once after ReconnectDelaySeconds; on failure (e.g. network still down) RunMailbox returns an error, Run records it, calls cancel() and all other healthy mailboxes stop, so the process exits.

Fix: Retry the reconnect with backoff until ctx is done; treat only fatal errors (e.g. auth failure) as terminal for the mailbox, and do not cancel the others.

(co)authored by ai:claude-sonnet-5-5

**Priority: minor** Found by a 100 Go Mistakes review (robustness / #62 goroutine lifecycle). Verified by reading the code. **Where:** `internal/app/app.go:539-543` (`RunMailbox`), `internal/app/app.go:612-660` (`Run`) **Problem:** `client.Reconnect` is attempted once after `ReconnectDelaySeconds`; on failure (e.g. network still down) `RunMailbox` returns an error, `Run` records it, calls `cancel()` and all other healthy mailboxes stop, so the process exits. **Fix:** Retry the reconnect with backoff until `ctx` is done; treat only fatal errors (e.g. auth failure) as terminal for the mailbox, and do not cancel the others. (co)authored by ai:claude-sonnet-5-5
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
IUS/xr-invoiced#49
No description provided.