Skip to content
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions http2/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,7 @@ func isClosedConnError(err error) bool {
return false
}

// TODO: remove this string search and be more like the Windows
// case below. That might involve modifying the standard library
// to return better error types.
str := err.Error()
if strings.Contains(str, "use of closed network connection") {
if errors.Is(err, net.ErrClosed) {
return true
}

Expand Down

0 comments on commit e0324fc

Please sign in to comment.