fix(imap): catch OSError on logout of timed-out socket (BIT-33892) #9

Merged
spark merged 1 commits from fix/BIT-33892-imap-logout-oserror into main 2026-12-03 23:31:14 +00:00
1 Commits
Author SHA1 Message Date
Xika 3ca283aa41 fix(imap): catch OSError on logout of timed-out socket (BIT-33892)
ci / verify (pull_request) Successful in 27s
The finally block in sync_account and retry_single_message only caught
imaplib.IMAP4.error from imap.logout(). When the underlying socket had
already timed out, logout() raises OSError('cannot read from timed out
object') which escaped the handler and crashed the sync run.

Add OSError to the except tuple so cleanup completes cleanly.

Paperclip-BIT-33892
2026-12-03 23:22:43 +00:00