Enable namserver deactivation if unresponsive on iOS (#1982)

This commit is contained in:
pascal-fischer 2024-05-17 12:59:46 +02:00 committed by GitHub
parent bd58eea8ea
commit d11b39282b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,6 @@ import (
"errors" "errors"
"fmt" "fmt"
"net" "net"
"runtime"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
@ -260,13 +259,10 @@ func (u *upstreamResolverBase) disable(err error) {
return return
} }
// todo test the deactivation logic, it seems to affect the client log.Warnf("Upstream resolving is Disabled for %v", reactivatePeriod)
if runtime.GOOS != "ios" { u.deactivate(err)
log.Warnf("Upstream resolving is Disabled for %v", reactivatePeriod) u.disabled = true
u.deactivate(err) go u.waitUntilResponse()
u.disabled = true
go u.waitUntilResponse()
}
} }
func (u *upstreamResolverBase) testNameserver(server string) error { func (u *upstreamResolverBase) testNameserver(server string) error {