Skip to content

Commit

Permalink
imapc: Don't reconnect on STATUS if auth failure was already seen.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and GitLab committed Jun 12, 2017
1 parent 77ea60d commit f94abb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib-storage/index/imapc/imapc-storage.c
Expand Up @@ -665,6 +665,10 @@ imapc_mailbox_open_callback(const struct imapc_command_reply *reply,

static int imapc_mailbox_get_capabilities(struct imapc_mailbox *mbox)
{
/* If authentication failed, don't check again. */
if (imapc_storage_client_handle_auth_failure(mbox->storage->client))
return -1;

return imapc_client_get_capabilities(mbox->storage->client->client,
&mbox->capabilities);

Expand All @@ -688,10 +692,6 @@ int imapc_mailbox_select(struct imapc_mailbox *mbox)

i_assert(mbox->client_box == NULL);

/* If authentication failed, don't check again. */
if (imapc_storage_client_handle_auth_failure(mbox->storage->client)) {
return -1;
}
if (imapc_mailbox_get_capabilities(mbox) < 0)
return -1;

Expand Down

0 comments on commit f94abb0

Please sign in to comment.