limit queue
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m48s

This commit is contained in:
matst80
2024-11-10 12:50:29 +01:00
parent ee13f516ef
commit fd9a66d193
3 changed files with 37 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ func NewPacketQueue(connection net.Conn) *PacketQueue {
l := make([]PacketWithData, 0, len(queue.Packets))
for _, packet := range queue.Packets {
if !packet.Consumed {
if !packet.Consumed && packet.Added.After(ts.Add(-time.Second)) {
l = append(l, packet)
}
}