Skip to content

Commit 66a38bc

Browse files
authored
Fix error codes reported by windows sockets. (#489)
Issue: Discovered when running tests in Debug on Windows. The error codes reported from socket functions were NOT what was expected. Investigation revealed that the value from `WSAGetLastError()` would get reset to 0 as a side-effect of logging. This was only happening in Debug, which is why we weren't catching it in CI. Therefore: Always call `WSAGetLastError()` **immediately** after a socket function fails, and store the value for use later.
1 parent 05c4eca commit 66a38bc

File tree

1 file changed

+97
-62
lines changed

1 file changed

+97
-62
lines changed

0 commit comments

Comments
 (0)