diff --git a/compat/module.go b/compat/module.go index 2cc6eca7..c87afd1a 100644 --- a/compat/module.go +++ b/compat/module.go @@ -28,6 +28,10 @@ var ( selfcheckFails int ) +// selfcheckFailThreshold holds the threshold of how many times the selfcheck +// must fail before it is reported. +const selfcheckFailThreshold = 5 + func init() { 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++ log.Errorf("compat: %s", err) - if selfcheckFails >= 3 { + if selfcheckFails >= selfcheckFailThreshold { issue.notify(err) } diff --git a/compat/selfcheck.go b/compat/selfcheck.go index 4aee02a7..1931b70e 100644 --- a/compat/selfcheck.go +++ b/compat/selfcheck.go @@ -28,12 +28,12 @@ var ( systemIntegrationCheckDialNet = fmt.Sprintf("ip4:%d", uint8(SystemIntegrationCheckProtocol)) systemIntegrationCheckDialIP = SystemIntegrationCheckDstIP.String() 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 = ".self-check." + resolver.InternalSpecialUseDomain dnsCheckReceivedDomain = make(chan string, 1) - dnsCheckWaitDuration = 10 * time.Second + dnsCheckWaitDuration = 30 * time.Second dnsCheckAnswerLock sync.Mutex dnsCheckAnswer net.IP )