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:
@@ -1392,11 +1392,13 @@ static CURLcode smtp_multi_statemach(struct connectdata *conn, bool *done)
|
||||
CURLcode result = CURLE_OK;
|
||||
struct smtp_conn *smtpc = &conn->proto.smtpc;
|
||||
|
||||
if((conn->handler->flags & PROTOPT_SSL) && !smtpc->ssldone)
|
||||
if((conn->handler->flags & PROTOPT_SSL) && !smtpc->ssldone) {
|
||||
result = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &smtpc->ssldone);
|
||||
else
|
||||
result = Curl_pp_statemach(&smtpc->pp, FALSE);
|
||||
if(result || !smtpc->ssldone)
|
||||
return result;
|
||||
}
|
||||
|
||||
result = Curl_pp_statemach(&smtpc->pp, FALSE);
|
||||
*done = (smtpc->state == SMTP_STOP) ? TRUE : FALSE;
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user