mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-23 17:01:29 +02:00
[client] Remove verbose arm-timer debug logs from sessionwatch
The per-arm Debugf lines added noise on every deadline update. Rejection logging already happens at the call site in engine_authsession.go; the watcher itself needs no extra instrumentation. https://claude.ai/code/session_01Y3bQoNgcVjTD4zDTvv7a8u
This commit is contained in:
@@ -287,16 +287,12 @@ func (w *Watcher) stopTimerLocked() {
|
||||
}
|
||||
|
||||
func (w *Watcher) armTimerLocked(deadline time.Time) {
|
||||
fireAt := deadline.Add(-w.lead)
|
||||
log.Debugf("sessionwatch: arming warning timer at %s (in %s)", fireAt.Format(time.RFC3339), time.Until(fireAt).Round(time.Second))
|
||||
w.timer = armOneShotLocked(fireAt, func() { w.fire(deadline) })
|
||||
w.timer = armOneShotLocked(deadline.Add(-w.lead), func() { w.fire(deadline) })
|
||||
// finalLead <= 0 disables the final-warning timer entirely. Used by
|
||||
// tests that predate the final-warning fallback so a millisecond-scale
|
||||
// deadline does not flush both timers at once.
|
||||
if w.finalLead > 0 {
|
||||
finalFireAt := deadline.Add(-w.finalLead)
|
||||
log.Debugf("sessionwatch: arming final-warning timer at %s (in %s)", finalFireAt.Format(time.RFC3339), time.Until(finalFireAt).Round(time.Second))
|
||||
w.finalTimer = armOneShotLocked(finalFireAt, func() { w.fireFinal(deadline) })
|
||||
w.finalTimer = armOneShotLocked(deadline.Add(-w.finalLead), func() { w.fireFinal(deadline) })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user