From 1eab777404c11dbdd3d4eedf1477adebf040cac7 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Fri, 22 Sep 2017 11:12:25 -0700 Subject: [PATCH] Close the imap socket for the selected mailbox on error. 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. --- imap/command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/imap/command.c b/imap/command.c index 891efb74..8529d9de 100644 --- a/imap/command.c +++ b/imap/command.c @@ -464,6 +464,7 @@ static void cmd_handle_fatal (IMAP_DATA* idata) (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; -- 2.50.1