Increase self-check timeouts and threshold

This commit is contained in:
Daniel 2022-03-30 16:25:33 +02:00
parent 0c5bdbbc13
commit 17f67be521
2 changed files with 7 additions and 3 deletions

View file

@ -28,6 +28,10 @@ var (
selfcheckFails int selfcheckFails int
) )
// selfcheckFailThreshold holds the threshold of how many times the selfcheck
// must fail before it is reported.
const selfcheckFailThreshold = 5
func init() { func init() {
module = modules.Register("compat", prep, start, stop, "base", "network", "interception", "netenv", "notifications") module = modules.Register("compat", prep, start, stop, "base", "network", "interception", "netenv", "notifications")
@ -82,7 +86,7 @@ func selfcheckTaskFunc(ctx context.Context, task *modules.Task) error {
selfcheckFails++ selfcheckFails++
log.Errorf("compat: %s", err) log.Errorf("compat: %s", err)
if selfcheckFails >= 3 { if selfcheckFails >= selfcheckFailThreshold {
issue.notify(err) issue.notify(err)
} }

View file

@ -28,12 +28,12 @@ var (
systemIntegrationCheckDialNet = fmt.Sprintf("ip4:%d", uint8(SystemIntegrationCheckProtocol)) systemIntegrationCheckDialNet = fmt.Sprintf("ip4:%d", uint8(SystemIntegrationCheckProtocol))
systemIntegrationCheckDialIP = SystemIntegrationCheckDstIP.String() systemIntegrationCheckDialIP = SystemIntegrationCheckDstIP.String()
systemIntegrationCheckPackets = make(chan packet.Packet, 1) systemIntegrationCheckPackets = make(chan packet.Packet, 1)
systemIntegrationCheckWaitDuration = 10 * time.Second systemIntegrationCheckWaitDuration = 30 * time.Second
// DNSCheckInternalDomainScope is the domain scope to use for dns checks. // DNSCheckInternalDomainScope is the domain scope to use for dns checks.
DNSCheckInternalDomainScope = ".self-check." + resolver.InternalSpecialUseDomain DNSCheckInternalDomainScope = ".self-check." + resolver.InternalSpecialUseDomain
dnsCheckReceivedDomain = make(chan string, 1) dnsCheckReceivedDomain = make(chan string, 1)
dnsCheckWaitDuration = 10 * time.Second dnsCheckWaitDuration = 30 * time.Second
dnsCheckAnswerLock sync.Mutex dnsCheckAnswerLock sync.Mutex
dnsCheckAnswer net.IP dnsCheckAnswer net.IP
) )