From 4e272ff06635d0fced6380592dfe5ece5ea78e52 Mon Sep 17 00:00:00 2001 From: Skyxim 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) } }()