quiche: use send() instead of sendto() to avoid macOS issue

sendto() always returns "Socket is already connected" error on macos

Closes #7260
This commit is contained in:
Bachue Zhou 2021-06-15 17:56:12 +08:00 committed by Daniel Stenberg
parent 30e491e5c9
commit a8472bb8ea
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 2 additions and 3 deletions

View File

@ -422,10 +422,9 @@ static CURLcode flush_egress(struct Curl_easy *data, int sockfd,
return CURLE_SEND_ERROR;
}
sent = sendto(sockfd, out, sent, 0,
(struct sockaddr *)&send_info.to, send_info.to_len);
sent = send(sockfd, out, sent, 0);
if(sent < 0) {
failf(data, "sendto() returned %zd", sent);
failf(data, "send() returned %zd", sent);
return CURLE_SEND_ERROR;
}
} while(1);