From 5169509d23cc7833c1acda5735ce79989a603f4a Mon Sep 17 00:00:00 2001 From: Nate Maninger Date: Fri, 13 Sep 2024 16:43:32 -0700 Subject: [PATCH] fix lint --- v1/errors_windows.go | 3 +-- v2/errors_windows.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/v1/errors_windows.go b/v1/errors_windows.go index cb581c9..a726d91 100644 --- a/v1/errors_windows.go +++ b/v1/errors_windows.go @@ -9,9 +9,8 @@ import ( // isConnCloseError returns true if the error is from the peer closing the // connection early. func isConnCloseError(err error) bool { - const WSAEPROTOTYPE = syscall.Errno(10041) return errors.Is(err, io.EOF) || - errors.Is(err, WSAEPROTOTYPE) || + errors.Is(err, syscall.Errno(10041)) || // WSAEPROTOTYPE errors.Is(err, syscall.WSAECONNABORTED) || errors.Is(err, syscall.WSAECONNRESET) } diff --git a/v2/errors_windows.go b/v2/errors_windows.go index cb581c9..a726d91 100644 --- a/v2/errors_windows.go +++ b/v2/errors_windows.go @@ -9,9 +9,8 @@ import ( // isConnCloseError returns true if the error is from the peer closing the // connection early. func isConnCloseError(err error) bool { - const WSAEPROTOTYPE = syscall.Errno(10041) return errors.Is(err, io.EOF) || - errors.Is(err, WSAEPROTOTYPE) || + errors.Is(err, syscall.Errno(10041)) || // WSAEPROTOTYPE errors.Is(err, syscall.WSAECONNABORTED) || errors.Is(err, syscall.WSAECONNRESET) }