You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note how cl.conn is only set in the anonymous goroutine if r.dial is successful.
Which means that r.clients can contain clients with conn == nil, but methods Close, CloseIdleConnections, and getClient all lack nil checks and assume that a non-nil *roundTripperWithCount always has a non-nil conn.
The text was updated successfully, but these errors were encountered:
Discovered while testing #4456.
Panic occurs in
RoundTripper.Close
here:My main hypothesis is that this occurs when there is a dialing error. See
RoundTripper.getClient
:Note how
cl.conn
is only set in the anonymous goroutine ifr.dial
is successful.Which means that
r.clients
can contain clients withconn == nil
, but methodsClose
,CloseIdleConnections
, andgetClient
all lack nil checks and assume that a non-nil*roundTripperWithCount
always has a non-nilconn
.The text was updated successfully, but these errors were encountered: