fix offline: remove deadlocking syncShutdownGracefully from deinit, limit flag sync range

- remove deinit from IMAPConnection, SMTPConnection — syncShutdownGracefully
  blocks and deadlocks if called on NIO event loop thread
- limit reconcileFlags to last 500 UIDs to avoid overwhelming the connection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-15 11:44:45 +01:00
parent d5eaf35665
commit 1e39a2bd43
3 changed files with 3 additions and 10 deletions
@@ -19,10 +19,6 @@ actor SMTPConnection {
self.responseHandler = SMTPResponseHandler()
}
deinit {
try? group.syncShutdownGracefully()
}
func connect() async throws -> SMTPResponse {
let handler = responseHandler
let hostname = host