File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ cdef object DEBUG_ENABLED
1313cdef bint TYPE_CHECKING
1414
1515cdef cython.uint _MAX_MSG_ABSOLUTE
16+ cdef cython.uint _DUPLICATE_PACKET_SUPPRESSION_INTERVAL
17+ cdef cython.uint _RECENT_PACKETS_MAX
1618
1719
1820cdef class AsyncListener:
Original file line number Diff line number Diff line change @@ -121,6 +121,13 @@ def _process_datagram_at_time(
121121 and (now - _DUPLICATE_PACKET_SUPPRESSION_INTERVAL ) < recent [0 ]
122122 and not recent [1 ]
123123 ):
124+ # Refresh LRU position so an actively-replayed payload is not
125+ # evicted by _RECENT_PACKETS_MAX distinct neighbours arriving
126+ # within the suppression interval. Preserve the original
127+ # (now, qu) tuple so the suppression window stays bounded
128+ # from the first observation rather than extending forever.
129+ del recent_packets [data ]
130+ recent_packets [data ] = recent
124131 # Guard against duplicate packets
125132 if debug :
126133 log .debug (
You can’t perform that action at this time.
0 commit comments