Update tokens.nim

This commit is contained in:
drpepper66666 2023-07-04 18:23:28 +02:00 committed by GitHub
parent 0489483c1b
commit ec46eaa400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -114,10 +114,10 @@ proc release*(token: Token; used=false; invalid=false) =
if token.isNil: return
if invalid or token.expired:
if invalid:
log "discarding invalid token"
log "discarding invalid token " & token.bearerTok
failedBearerTokens[token.bearerTok] = getTime()
elif token.expired:
log "discarding expired token"
log "discarding expired token " & token.bearerTok
let idx = tokenPool.find(token)
if idx > -1: tokenPool.delete(idx)