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 <noreply@anthropic.com>
This commit is contained in:
parent
212fd49534
commit
7269eca3e9
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ fn worker_loop(
|
||||||
cmd_rx: mpsc::Receiver<WorkerCmd>,
|
cmd_rx: mpsc::Receiver<WorkerCmd>,
|
||||||
result_tx: mpsc::Sender<WorkerResult>,
|
result_tx: mpsc::Sender<WorkerResult>,
|
||||||
) {
|
) {
|
||||||
let mut session = connect::connect(&config).ok();
|
let mut session: Option<connect::ImapSession> = None;
|
||||||
|
|
||||||
for cmd in &cmd_rx {
|
for cmd in &cmd_rx {
|
||||||
match cmd {
|
match cmd {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue