aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/imap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 8607d0011..ab98e0a96 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1057,9 +1057,9 @@ static CURLcode imap_state_auth_final_resp(struct connectdata *conn,
failf(data, "Authentication failed: %d", imapcode);
result = CURLE_LOGIN_DENIED;
}
-
- /* End of connect phase */
- state(conn, IMAP_STOP);
+ else
+ /* End of connect phase */
+ state(conn, IMAP_STOP);
return result;
}