mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
fix / lifetime.Time not updated on expiration shift
Former-commit-id: 03cd1e8dcf20d6e68b70667d1f808860cb027d32
This commit is contained in:
parent
f6436f2af4
commit
768dd76b62
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user