forked from quic-go/quic-go
http3: allow re-dialing of connection after a dial error (#4573)
* http3: do not cache dial error * add an integration test * http3: add a unit test for dial failures --------- Co-authored-by: 世界 <i@sekai.icu>
This commit is contained in:
@@ -166,6 +166,7 @@ func (r *RoundTripper) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.
|
||||
}
|
||||
|
||||
if cl.dialErr != nil {
|
||||
r.removeClient(hostname)
|
||||
return nil, cl.dialErr
|
||||
}
|
||||
defer cl.useCount.Add(-1)
|
||||
@@ -258,6 +259,7 @@ func (r *RoundTripper) getClient(ctx context.Context, hostname string, onlyCache
|
||||
select {
|
||||
case <-cl.dialing:
|
||||
if cl.dialErr != nil {
|
||||
delete(r.clients, hostname)
|
||||
return nil, false, cl.dialErr
|
||||
}
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user