imap/pop3/smtp: Speed up SSL connection initialization
Don't wait for the next callback call (usually 1 second) before continuing with protocol specific connection initialization.
This commit is contained in:
@@ -1704,11 +1704,13 @@ static CURLcode imap_multi_statemach(struct connectdata *conn, bool *done)
|
||||
CURLcode result = CURLE_OK;
|
||||
struct imap_conn *imapc = &conn->proto.imapc;
|
||||
|
||||
if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone)
|
||||
if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) {
|
||||
result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &imapc->ssldone);
|
||||
else
|
||||
result = Curl_pp_statemach(&imapc->pp, FALSE);
|
||||
if(result || !imapc->ssldone)
|
||||
return result;
|
||||
}
|
||||
|
||||
result = Curl_pp_statemach(&imapc->pp, FALSE);
|
||||
*done = (imapc->state == IMAP_STOP) ? TRUE : FALSE;
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user