mirror of
https://github.com/safing/portmaster
synced 2025-09-02 18:49:14 +00:00
Improve timeouts of compatibility check
This commit is contained in:
parent
ec36dc1d0d
commit
a76e659989
3 changed files with 6 additions and 6 deletions
|
@ -16,7 +16,7 @@ var (
|
||||||
module *modules.Module
|
module *modules.Module
|
||||||
|
|
||||||
selfcheckTask *modules.Task
|
selfcheckTask *modules.Task
|
||||||
selfcheckTaskRetryAfter = 5 * time.Second
|
selfcheckTaskRetryAfter = 15 * time.Second
|
||||||
|
|
||||||
// selfCheckIsFailing holds whether or not the self-check is currently
|
// selfCheckIsFailing holds whether or not the self-check is currently
|
||||||
// failing. This helps other failure systems to not make noise when there is
|
// failing. This helps other failure systems to not make noise when there is
|
||||||
|
@ -34,7 +34,7 @@ var (
|
||||||
|
|
||||||
// selfcheckFailThreshold holds the threshold of how many times the selfcheck
|
// selfcheckFailThreshold holds the threshold of how many times the selfcheck
|
||||||
// must fail before it is reported.
|
// must fail before it is reported.
|
||||||
const selfcheckFailThreshold = 5
|
const selfcheckFailThreshold = 10
|
||||||
|
|
||||||
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")
|
||||||
|
@ -60,7 +60,7 @@ func start() error {
|
||||||
Schedule(time.Now().Add(selfcheckTaskRetryAfter))
|
Schedule(time.Now().Add(selfcheckTaskRetryAfter))
|
||||||
|
|
||||||
module.NewTask("clean notify thresholds", cleanNotifyThreshold).
|
module.NewTask("clean notify thresholds", cleanNotifyThreshold).
|
||||||
Repeat(10 * time.Minute)
|
Repeat(1 * time.Hour)
|
||||||
|
|
||||||
return module.RegisterEventHook(
|
return module.RegisterEventHook(
|
||||||
netenv.ModuleName,
|
netenv.ModuleName,
|
||||||
|
|
|
@ -236,7 +236,7 @@ func (issue *appIssue) notify(proc *process.Process) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
notifyThresholdMinIncidents = 11
|
notifyThresholdMinIncidents = 10
|
||||||
notifyThresholdResetAfter = 2 * time.Minute
|
notifyThresholdResetAfter = 2 * time.Minute
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -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 = 40 * time.Second
|
systemIntegrationCheckWaitDuration = 45 * 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 = 40 * time.Second
|
dnsCheckWaitDuration = 45 * time.Second
|
||||||
dnsCheckAnswerLock sync.Mutex
|
dnsCheckAnswerLock sync.Mutex
|
||||||
dnsCheckAnswer net.IP
|
dnsCheckAnswer net.IP
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue