From 4f04fe96a82dd2a2f36dd445f997b04d4f120324 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 2 Jul 2022 15:42:23 +0300 Subject: polaris/protocol: delete PingMessage from queue immediately, just like ACK/NAKs --- src/polaris/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/polaris/protocol.py b/src/polaris/protocol.py index d562ff9..c145009 100644 --- a/src/polaris/protocol.py +++ b/src/polaris/protocol.py @@ -989,7 +989,7 @@ class UDPConnection(threading.Thread, ConnectionStatusListener): remove_list = [] for wm in self.outgoing_queue: if wm.phase == MessagePhase.DONE: - if isinstance(wm.message, (AckMessage, NakMessage)) or time.time() - wm.phase_update_time >= MESSAGE_QUEUE_REMOVE_DELAY: + if isinstance(wm.message, (AckMessage, NakMessage, PingMessage)) or time.time() - wm.phase_update_time >= MESSAGE_QUEUE_REMOVE_DELAY: remove_list.append(wm) continue message = wm -- cgit v1.2.3