Skip to content

Commit 29adf76

Browse files
Use WSAStartup return value for error reporting (#3630)
* Use WSAGetLastError for UDP send errors on Windows * Use WSAStartup return value for error reporting
1 parent 03bec98 commit 29adf76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/spdlog/details/udp_client-windows.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class udp_client {
3232
WSADATA wsaData;
3333
auto rv = ::WSAStartup(MAKEWORD(2, 2), &wsaData);
3434
if (rv != 0) {
35-
throw_winsock_error_("WSAStartup failed", ::WSAGetLastError());
35+
throw_winsock_error_("WSAStartup failed", rv);
3636
}
3737
}
3838

0 commit comments

Comments
 (0)