mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
parent
a5542c23e7
commit
ce05754c7c
@ -1138,6 +1138,7 @@ static CURLcode cr_connect(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
CURLcode result;
|
||||
bool wants_read;
|
||||
bool wants_write;
|
||||
ssize_t nread;
|
||||
|
||||
DEBUGASSERT(backend);
|
||||
|
||||
@ -1280,7 +1281,13 @@ static CURLcode cr_connect(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
|
||||
if(wants_read) {
|
||||
CURL_TRC_CF(data, cf, "rustls_connection wants us to read_tls.");
|
||||
if(tls_recv_more(cf, data, &tmperr) < 0) {
|
||||
nread = tls_recv_more(cf, data, &tmperr);
|
||||
if(nread == 0) {
|
||||
connssl->peer_closed = TRUE;
|
||||
failf(data, "TLS connect error: Connection closed abruptly");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
if(nread < 0) {
|
||||
if(tmperr == CURLE_AGAIN) {
|
||||
CURL_TRC_CF(data, cf, "reading would block");
|
||||
connssl->io_need = CURL_SSL_IO_NEED_RECV;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user