fixed cleanup deadlock
This commit is contained in:
parent
09e12282d0
commit
e75e02ab44
1 changed files with 1 additions and 1 deletions
2
jwt.go
2
jwt.go
|
|
@ -175,12 +175,12 @@ func (jwt *JWT) clean() {
|
|||
}
|
||||
now := time.Now().UTC().Unix()
|
||||
jwt.Lock()
|
||||
defer jwt.Unlock()
|
||||
for k, v := range jwt.list {
|
||||
if now > v {
|
||||
delete(jwt.list, k)
|
||||
}
|
||||
}
|
||||
jwt.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue