mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Fixed memory leak in message throttle mechanism
This commit is contained in:
parent
b6bf22b77d
commit
03a20a05f7
@ -378,9 +378,10 @@ public class Connection implements MessageListener {
|
||||
.collect(Collectors.toList()).toString());
|
||||
}
|
||||
}
|
||||
// we limit to max 1000 (MSG_THROTTLE_PER_10SEC) entries
|
||||
messageTimeStamps.remove(0);
|
||||
}
|
||||
// we limit to max 1000 (MSG_THROTTLE_PER_10SEC) entries
|
||||
while(messageTimeStamps.size() > MSG_THROTTLE_PER_10_SEC)
|
||||
messageTimeStamps.remove(0);
|
||||
|
||||
messageTimeStamps.add(new Tuple2<>(now, networkEnvelope));
|
||||
return violated;
|
||||
|
Loading…
Reference in New Issue
Block a user