diff options
author | Bachue Zhou <bachue.shu@gmail.com> | 2021-06-15 17:56:12 +0800 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-06-21 14:54:51 +0200 |
commit | a8472bb8eac504d05e72c7205278f2b5e323b702 (patch) | |
tree | d27d22b3ef24bb87940eff9d6c68942771b436e3 | |
parent | 30e491e5c921aecca5a16083d8185840dc64eccd (diff) | |
download | curl-a8472bb8eac504d05e72c7205278f2b5e323b702.tar.gz |
quiche: use send() instead of sendto() to avoid macOS issue
sendto() always returns "Socket is already connected" error on macos
Closes #7260
-rw-r--r-- | lib/vquic/quiche.c | 5 |
1 files 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); |