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()
|
now := time.Now().UTC().Unix()
|
||||||
jwt.Lock()
|
jwt.Lock()
|
||||||
defer jwt.Unlock()
|
|
||||||
for k, v := range jwt.list {
|
for k, v := range jwt.list {
|
||||||
if now > v {
|
if now > v {
|
||||||
delete(jwt.list, k)
|
delete(jwt.list, k)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
jwt.Unlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue