mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Delay the self-check slightly
This commit is contained in:
parent
938a43c300
commit
3027409b74
1 changed files with 3 additions and 2 deletions
|
@ -29,14 +29,15 @@ func prep() error {
|
|||
func start() error {
|
||||
selfcheckTask = module.NewTask("compatibility self-check", selfcheckTaskFunc).
|
||||
Repeat(1 * time.Minute).
|
||||
StartASAP()
|
||||
MaxDelay(selfcheckTaskRetryAfter).
|
||||
Schedule(time.Now().Add(selfcheckTaskRetryAfter))
|
||||
|
||||
return module.RegisterEventHook(
|
||||
netenv.ModuleName,
|
||||
netenv.NetworkChangedEvent,
|
||||
"trigger compat self-check",
|
||||
func(_ context.Context, _ interface{}) error {
|
||||
selfcheckTask.StartASAP()
|
||||
selfcheckTask.Schedule(time.Now().Add(selfcheckTaskRetryAfter))
|
||||
return nil
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue