From 2445793d15af39fac9ce527bb28ffd42a974bf4f Mon Sep 17 00:00:00 2001 From: Jaume Date: Tue, 14 Jun 2022 05:41:05 +0100 Subject: [PATCH] windows: client connect: use sockaddr size --- lib/core-net/client/connect3.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/core-net/client/connect3.c b/lib/core-net/client/connect3.c index b6433e7a8..ebd0ca374 100644 --- a/lib/core-net/client/connect3.c +++ b/lib/core-net/client/connect3.c @@ -110,7 +110,13 @@ lws_client_connect_check(struct lws *wsi, int *real_errno) #else - if (!connect(wsi->desc.sockfd, (const struct sockaddr *)&wsi->sa46_peer.sa4, 0)) + if (!connect(wsi->desc.sockfd, (const struct sockaddr *)&wsi->sa46_peer.sa4, +#if defined(WIN32) + sizeof(struct sockaddr))) +#else + 0)) +#endif + return LCCCR_CONNECTED; en = LWS_ERRNO;