1 IMAP: only close socket when not already disconnected.
2 closes http://bugs.mutt.org/3161 and
3 http://bugs.debian.org/493719
9 void imap_close_connection(IMAP_DATA* idata)
11 - mutt_socket_close (idata->conn);
12 - idata->state = IMAP_DISCONNECTED;
13 + if (idata->state != IMAP_DISCONNECTED)
15 + mutt_socket_close (idata->conn);
16 + idata->state = IMAP_DISCONNECTED;
18 idata->seqno = idata->nextcmd = idata->lastcmd = idata->status = 0;
19 memset (idata->cmds, 0, sizeof (IMAP_COMMAND) * idata->cmdslots);