The new $imap_poll_timeout calls the cmd_handle_fatal() error handler
on timeout, which is supposed to close and cleanup.
However, for the currently selected mailbox, the error handler was not
closing the socket after closing up the mailbox. This left extra
SSL/GnuTLS data around and was causing errors on an attempt to
reconnect.
Thanks to Fabian Groffen for reporting the issue.
(idata->reopen & IMAP_REOPEN_ALLOW))
{
mx_fastclose_mailbox (idata->ctx);
+ mutt_socket_close (idata->conn);
mutt_error (_("Mailbox closed"));
mutt_sleep (1);
idata->state = IMAP_DISCONNECTED;