net/http2: fix erringRoundTripper

The http transport added a new interface to detect RoundTrippers that
always error. Prior to this, the erringRoundTripper would not be
identified as such and a new connection was always created.

Updates golang/go#40213

Change-Id: Icc315dcc9ce8ea0db94a1f2c58c6a741675d8962
Reviewed-on: https://go-review.googlesource.com/c/net/+/243257
Reviewed-by: Chris Friesen <cbf123@gmail.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/http2/transport.go b/http2/transport.go
index 76a92e0..2482f7b 100644
--- a/http2/transport.go
+++ b/http2/transport.go
@@ -2525,6 +2525,7 @@
 
 type erringRoundTripper struct{ err error }
 
+func (rt erringRoundTripper) RoundTripErr() error                             { return rt.err }
 func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err }
 
 // gzipReader wraps a response body so it can lazily