net/dns/resolver: remove maxDoHInFlight
It was originally added to control memory use on iOS (#2490), but then was relaxed conditionally when running on iOS 15 (#3098). Now that we require iOS 15, there's no need for the limit at all, so simplify back to the original state. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:

committed by
Mihai Parparita

parent
b6908181ff
commit
0e3fb91a39
@ -12,7 +12,6 @@ import (
|
||||
"time"
|
||||
|
||||
dns "golang.org/x/net/dns/dnsmessage"
|
||||
"tailscale.com/hostinfo"
|
||||
"tailscale.com/types/dnstype"
|
||||
)
|
||||
|
||||
@ -143,33 +142,6 @@ func TestGetRCode(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMaxDoHInFlight(t *testing.T) {
|
||||
tests := []struct {
|
||||
goos string
|
||||
ver string
|
||||
want int
|
||||
}{
|
||||
{"ios", "", 10},
|
||||
{"ios", "1532", 10},
|
||||
{"ios", "9.3.2", 10},
|
||||
{"ios", "14.3.2", 10},
|
||||
{"ios", "15.3.2", 1000},
|
||||
{"ios", "20.3.2", 1000},
|
||||
{"android", "", 1000},
|
||||
{"darwin", "", 1000},
|
||||
{"linux", "", 1000},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(fmt.Sprintf("%s-%s", tc.goos, tc.ver), func(t *testing.T) {
|
||||
hostinfo.SetOSVersion(tc.ver)
|
||||
got := maxDoHInFlight(tc.goos)
|
||||
if got != tc.want {
|
||||
t.Errorf("got %d; want %d", got, tc.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
var testDNS = flag.Bool("test-dns", false, "run tests that require a working DNS server")
|
||||
|
||||
func TestGetKnownDoHClientForProvider(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user