Increase self-check timeouts and threshold
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user