From c3035df5be651fa9601b7673843bac2bb407e493 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Fri, 15 Jul 2022 21:54:57 +0800 Subject: [PATCH] fix: DoH retry HTTP/3 --- dns/doh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/doh.go b/dns/doh.go index ad889ab1..ca5b655c 100644 --- a/dns/doh.go +++ b/dns/doh.go @@ -172,7 +172,7 @@ func (doh *dohTransport) RoundTrip(req *http.Request) (*http.Response, error) { var h3Err bool var fallbackErr bool defer func() { - if doh.preferH3 && h3Err { + if doh.preferH3 && (h3Err || fallbackErr) { doh.canUseH3.Store(doh.preferH3 && fallbackErr) } }()