Skip to content

Commit

Permalink
fix / lifetime.Time not updated on expiration shift
Browse files Browse the repository at this point in the history
  • Loading branch information
akiraho committed Aug 15, 2018
1 parent fe04a27 commit 336d7c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sessions/lifetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func (lt *LifeTime) Revive(onExpire func()) {
// Shift resets the lifetime based on "d".
func (lt *LifeTime) Shift(d time.Duration) {
if d > 0 && lt.timer != nil {
lt.Time = time.Now().Add(d)
lt.timer.Reset(d)
}
}
Expand Down

0 comments on commit 336d7c7

Please sign in to comment.