You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This affects net.isConnError() and a fix for #35131.
func isConnError(err error) bool {
if se, ok := err.(syscall.Errno); ok {
return se == syscall.WSAECONNRESET || se == syscall.WSAECONNABORTED
}
return false
WSAGetLastError is just a synonym for GetLastError. At least on amd64 the Go runtime cheats by inlining GetLastError to just load directly from %gs. See asmstdcall and getlasterror in runtime/sys_windows_amd64.s.
If we get this wrong somewhere lets look at that specific case, but I'm going to close this general issue because there shouldn't be a general problem here.
Winsock API calls don't set
errno
, instead you callWSAGetLastError()
. It looks like Go doesn't. Have I missed something?https://docs.microsoft.com/en-us/windows/win32/winsock/error-codes-errno-h-errno-and-wsagetlasterror-2
This affects net.isConnError() and a fix for #35131.
cc @bcmills @ianlancetaylor @iwdgo @alexbrainman @zx2c4 @mattn @jstarks
@gopherbot add OS-Windows
The text was updated successfully, but these errors were encountered: