]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
quiche: use send() instead of sendto() to avoid macOS issue
authorBachue Zhou <bachue.shu@gmail.com>
Tue, 15 Jun 2021 09:56:12 +0000 (17:56 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 21 Jun 2021 12:54:51 +0000 (14:54 +0200)
sendto() always returns "Socket is already connected" error on macos

Closes #7260

lib/vquic/quiche.c

index b62d88437a16a2383f6a0753e7a9c761297f0ede..5462f770b78742bc0765225686e111dfeb87d006 100644 (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);