Make tailnet updates check configurable

This commit is contained in:
Juan Font Alonso 2022-07-12 12:27:28 +02:00
parent e0b15c18ce
commit cf3fc85196
3 changed files with 24 additions and 3 deletions

View file

@ -16,8 +16,7 @@ import (
)
const (
keepAliveInterval = 60 * time.Second
updateCheckInterval = 10 * time.Second
keepAliveInterval = 60 * time.Second
)
type contextKey string
@ -640,7 +639,7 @@ func (h *Headscale) scheduledPollWorker(
machine *Machine,
) {
keepAliveTicker := time.NewTicker(keepAliveInterval)
updateCheckerTicker := time.NewTicker(updateCheckInterval)
updateCheckerTicker := time.NewTicker(h.cfg.ChangesCheckInterval)
defer closeChanWithLog(
updateChan,