Another amendment that may actually be useful even without the original patch: make sure to close() the imap connection socket in cmd_handle_fatal. If the connection socket stays open but the connection is in IMAP_DISCONNECTED state, we'll just busyloop: select() returns immediately but nothing handles the event on the imap connection fd.
# HG changeset patch # User Lauri Tirkkonen <loth...@iki.fi> # Date 1496216664 -10800 # Wed May 31 10:44:24 2017 +0300 # Node ID 008de8f1402470e22607b7e2e125e73009a15ea9 # Parent 2337b5ea8ec9f71f458850f0fdc6645f09b6d6b0 actually close() imap socket in cmd_handle_fatal diff -r 2337b5ea8ec9 -r 008de8f14024 imap/command.c --- a/imap/command.c Wed May 24 17:29:32 2017 +0300 +++ b/imap/command.c Wed May 31 10:44:24 2017 +0300 @@ -446,7 +446,7 @@ mx_fastclose_mailbox (idata->ctx); mutt_error (_("Mailbox closed")); mutt_sleep (1); - idata->state = IMAP_DISCONNECTED; + imap_close_connection (idata); } if (idata->state < IMAP_SELECTED) -- Lauri Tirkkonen | lotheac @ IRCnet