handle_stat (proxy_server.py:233) and handle_list (proxy_server.py:244) call IMAPBackend.fetch_message_size synchronously inside a loop, on the asyncio event loop thread. Every blocking imaplib round-trip stalls all other clients. There is also no socket timeout on imaplib (smtplib already uses timeout=30), so a dead backend hangs the session indefinitely.
Fix:
Either fetch all sizes in a single round-trip (UID FETCH 1:* (RFC822.SIZE)) or wrap the blocking calls in asyncio.to_thread.
Apply a connection/socket timeout to the IMAP client.
Acceptance:
STAT/LIST do not block the event loop.
An unresponsive IMAP backend fails within a bounded time rather than hanging.
handle_stat (proxy_server.py:233) and handle_list (proxy_server.py:244) call IMAPBackend.fetch_message_size synchronously inside a loop, on the asyncio event loop thread. Every blocking imaplib round-trip stalls all other clients. There is also no socket timeout on imaplib (smtplib already uses timeout=30), so a dead backend hangs the session indefinitely.
Fix:
- Either fetch all sizes in a single round-trip (UID FETCH 1:* (RFC822.SIZE)) or wrap the blocking calls in asyncio.to_thread.
- Apply a connection/socket timeout to the IMAP client.
Acceptance:
- STAT/LIST do not block the event loop.
- An unresponsive IMAP backend fails within a bounded time rather than hanging.
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.
handle_stat (proxy_server.py:233) and handle_list (proxy_server.py:244) call IMAPBackend.fetch_message_size synchronously inside a loop, on the asyncio event loop thread. Every blocking imaplib round-trip stalls all other clients. There is also no socket timeout on imaplib (smtplib already uses timeout=30), so a dead backend hangs the session indefinitely.
Fix:
Acceptance: