From 7269eca3e94c960f70437236fc6e204414cfd702 Mon Sep 17 00:00:00 2001 From: Shautvast Date: Wed, 18 Feb 2026 08:57:57 +0100 Subject: [PATCH] Fix worker thread blocking startup by deferring IMAP connection The eager connect() call in the worker thread could hang if the server was unreachable, preventing the worker from ever processing commands. Let refresh() handle the initial connection instead. Co-Authored-By: Claude Opus 4.6 --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e80ff29..fc7bf86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,7 +50,7 @@ fn worker_loop( cmd_rx: mpsc::Receiver, result_tx: mpsc::Sender, ) { - let mut session = connect::connect(&config).ok(); + let mut session: Option = None; for cmd in &cmd_rx { match cmd {