From f2768d5c68857deeb344e4331952339feabe38e1 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 18 Jul 2024 19:14:04 -0500 Subject: [PATCH] Fix invalid parameter passed to WSASendMsg() The second parameter is for flags, not number of messages. --- src/platform/windows/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/windows/misc.cpp b/src/platform/windows/misc.cpp index 465a0085f5..a4190e0170 100644 --- a/src/platform/windows/misc.cpp +++ b/src/platform/windows/misc.cpp @@ -1537,7 +1537,7 @@ namespace platf { // If USO is not supported, this will fail and the caller will fall back to unbatched sends. DWORD bytes_sent; - return WSASendMsg((SOCKET) send_info.native_socket, &msg, 1, &bytes_sent, nullptr, nullptr) != SOCKET_ERROR; + return WSASendMsg((SOCKET) send_info.native_socket, &msg, 0, &bytes_sent, nullptr, nullptr) != SOCKET_ERROR; } bool @@ -1614,7 +1614,7 @@ namespace platf { msg.Control.len = cmbuflen; DWORD bytes_sent; - if (WSASendMsg((SOCKET) send_info.native_socket, &msg, 1, &bytes_sent, nullptr, nullptr) == SOCKET_ERROR) { + if (WSASendMsg((SOCKET) send_info.native_socket, &msg, 0, &bytes_sent, nullptr, nullptr) == SOCKET_ERROR) { auto winerr = WSAGetLastError(); BOOST_LOG(warning) << "WSASendMsg() failed: "sv << winerr; return false;