diff options
Diffstat (limited to 'src/net/error_windows_test.go')
| -rw-r--r-- | src/net/error_windows_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/error_windows_test.go b/src/net/error_windows_test.go index 25825f96f8..e99ea492bb 100644 --- a/src/net/error_windows_test.go +++ b/src/net/error_windows_test.go @@ -27,3 +27,12 @@ func isENOBUFS(err error) bool { // defined in the syscall package we may as well check for it. return errors.Is(err, syscall.ENOBUFS) } + +func isECONNRESET(err error) bool { + return errors.Is(err, syscall.ECONNRESET) +} + +func isWSAECONNREFUSED(err error) bool { + const WSAECONNREFUSED = syscall.Errno(10061) + return errors.Is(err, WSAECONNREFUSED) +} |
