diff --git a/client/session.go b/client/session.go index e815727d..0fbf2cc6 100644 --- a/client/session.go +++ b/client/session.go @@ -58,6 +58,9 @@ func (cl *Client) enableAutoSessionRenewal(s *session) { go func(s *session) { for { w := (s.EndTime.Sub(time.Now().UTC()) * 5) / 6 + if w < 0 { + return + } timer = time.NewTimer(w) select { case <-timer.C: