From a8472bb8eac504d05e72c7205278f2b5e323b702 Mon Sep 17 00:00:00 2001 From: Bachue Zhou Date: Tue, 15 Jun 2021 17:56:12 +0800 Subject: [PATCH] quiche: use send() instead of sendto() to avoid macOS issue sendto() always returns "Socket is already connected" error on macos Closes #7260 --- lib/vquic/quiche.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/vquic/quiche.c b/lib/vquic/quiche.c index b62d88437..5462f770b 100644 --- a/lib/vquic/quiche.c +++ b/lib/vquic/quiche.c @@ -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);