* Try (once) to reconnect after an IMAP failure
Closes #346
* Keep recovering state in IMAP_DATA instead of in a static local variable
Closes #346
idata->state = IMAP_DISCONNECTED;
}
- if (idata->state < IMAP_SELECTED)
- imap_close_connection (idata);
+ imap_close_connection (idata);
+ if (!idata->recovering)
+ {
+ idata->recovering = 1;
+ if (imap_conn_find (&idata->conn->account, 0))
+ mutt_clear_error ();
+ idata->recovering = 0;
+ }
}
/* cmd_handle_untagged: fallback parser for otherwise unhandled messages. */
{
/* This data is specific to a CONNECTION to an IMAP server */
CONNECTION *conn;
+ unsigned char recovering;
unsigned char state;
unsigned char status;
/* let me explain capstr: SASL needs the capability string (not bits).