Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed Sep 13, 2024
1 parent 471f45c commit 5169509
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions v1/errors_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
3 changes: 1 addition & 2 deletions v2/errors_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 5169509

Please sign in to comment.