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