This seems to be happening especially with dsync migrations from IMAP
servers with small timeouts. The initial dsync run opens imapc connection
early to do a LIST + SELECT the first mailbox, but then dsync may spend a
while creating all the local mailboxes before it continues using the imapc
connection.
conn->box = box;
box->conn = conn->conn;
box->msgmap = imapc_msgmap_init();
+ /* if we get disconnected before the SELECT is finished, allow
+ one reconnect retry. */
+ box->reconnect_ok = TRUE;
return box;
}
ctx.ret = -2;
cmd = imapc_client_mailbox_cmd(mbox->client_box,
imapc_mailbox_open_callback, &ctx);
- imapc_command_set_flags(cmd, IMAPC_COMMAND_FLAG_SELECT);
+ imapc_command_set_flags(cmd, IMAPC_COMMAND_FLAG_SELECT |
+ IMAPC_COMMAND_FLAG_RETRIABLE);
if (imapc_mailbox_want_examine(mbox)) {
imapc_command_sendf(cmd, "EXAMINE %s",
imapc_mailbox_get_remote_name(mbox));