mirror of
https://github.com/lnbits/lnbits.git
synced 2025-05-30 01:29:30 +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
|
||||
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)
|
||||
self.tokens -= 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user