mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-11 01:11:18 +02:00
refactor: Fix token bug
orig commit: e3edcbe2fee309a0e8d02887e8296a07ed7601db
This commit is contained in:
parent
d6bfe40c46
commit
929f369826
@ -61,7 +61,7 @@ class TokenBucket:
|
|||||||
|
|
||||||
# After waiting, update time and add one token
|
# After waiting, update time and add one token
|
||||||
self.last_refill = time.monotonic()
|
self.last_refill = time.monotonic()
|
||||||
self.tokens = 1 # We now have exactly one token available
|
self.tokens = 1
|
||||||
|
|
||||||
# Consume a token (will be 0 or more after consumption)
|
# Consume a token (will be 0 or more after consumption)
|
||||||
self.tokens -= 1
|
self.tokens -= 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user