mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 17:06:53 +00:00
Fix leaky bucket serialization
// FREEBIE
This commit is contained in:
1 parent
9f5e213402
commit
93cbdadff3
2 files changed
+54
-1
No files matched your search
@@ -42,7 +42,8 @@ public class LeakyBucket {
|
||||
}
|
||||
|
||||
public boolean add(int amount) {
|
||||
this.spaceRemaining = getUpdatedSpaceRemaining();
|
||||
this.spaceRemaining = getUpdatedSpaceRemaining();
|
||||
this.lastUpdateTimeMillis = System.currentTimeMillis();
|
||||
|
||||
if (this.spaceRemaining >= amount) {
|
||||
this.spaceRemaining -= amount;
|
||||
|
||||
Reference in new issue
Block a user