fix: DoH retry HTTP/3

This commit is contained in:
gVisor bot 2022-07-15 21:54:57 +08:00
parent 0bab694233
commit c3035df5be

View file

@ -172,7 +172,7 @@ func (doh *dohTransport) RoundTrip(req *http.Request) (*http.Response, error) {
var h3Err bool var h3Err bool
var fallbackErr bool var fallbackErr bool
defer func() { defer func() {
if doh.preferH3 && h3Err { if doh.preferH3 && (h3Err || fallbackErr) {
doh.canUseH3.Store(doh.preferH3 && fallbackErr) doh.canUseH3.Store(doh.preferH3 && fallbackErr)
} }
}() }()