From 692f3d5149e7b6fb6c779bbcd710bc675f0aaa1b Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Wed, 27 Oct 2021 10:16:54 -0400 Subject: [PATCH] Log how long session has been idle --- router/forwarder/scanner.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/router/forwarder/scanner.go b/router/forwarder/scanner.go index aa390b297..c4cda5c6b 100644 --- a/router/forwarder/scanner.go +++ b/router/forwarder/scanner.go @@ -76,9 +76,10 @@ func (self *Scanner) scan() { var idleCircuitIds []string for circuitId, ft := range circuits { - if time.Since(ft.(*forwardTable).last) > self.timeout { + idleTime := time.Since(ft.(*forwardTable).last) + if idleTime > self.timeout { idleCircuitIds = append(idleCircuitIds, circuitId) - logrus.Warnf("[s/%s] idle after [%s]", circuitId, self.timeout) + logrus.Warnf("[s/%s] idle for [%v], idle threshold [%v]", circuitId, idleTime, self.timeout) } }