Skip to content

Commit

Permalink
test for neg duration
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmturner committed Jun 11, 2018
1 parent 8a03688 commit b7336d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b7336d9

Please sign in to comment.