On Windows, setsockopt() is mapped to mingw_setsockopt() which calls
the WinSock/WSA version of setsockopt(). This routine is documented as
setting an internal error code that is available via WSAGetLastError().
Core Git callers of setsockopt() (connect.c, daemon.c, http.c) assume that
when -1 is returned, that errno contains the reason. But on Windows, this
is not true. This results in a random error message being printed.
Observed in 2.24.0.
On Windows,
setsockopt()is mapped tomingw_setsockopt()which callsthe WinSock/WSA version of
setsockopt(). This routine is documented assetting an internal error code that is available via
WSAGetLastError().Core Git callers of
setsockopt()(connect.c, daemon.c, http.c) assume thatwhen -1 is returned, that
errnocontains the reason. But on Windows, thisis not true. This results in a random error message being printed.
Observed in 2.24.0.