Skip to content

Commit cf5599a

Browse files
committed
exhttp: Include syscall.EPIPE in network errors
1 parent 46a893a commit cf5599a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exhttp/networkerror.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ func IsNetworkError(err error) bool {
2626
errno == syscall.ETIMEDOUT ||
2727
errno == syscall.ECONNREFUSED ||
2828
errno == syscall.EHOSTDOWN ||
29-
errno == syscall.EHOSTUNREACH
29+
errno == syscall.EHOSTUNREACH ||
30+
errno == syscall.EPIPE
3031
} else if netError := net.Error(nil); errors.As(err, &netError) {
3132
return true
3233
} else if errors.As(err, &http2.StreamError{}) {

0 commit comments

Comments
 (0)