From 1a2bcb7e332bf1a3bae5774f48fb89bf09b15b13 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sun, 8 Sep 2024 02:18:21 +0300 Subject: [PATCH] Update request time in vectors_requested to not re-request too often --- minode/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minode/connection.py b/minode/connection.py index b7f9a75..606a1d0 100644 --- a/minode/connection.py +++ b/minode/connection.py @@ -431,13 +431,13 @@ class ConnectionBase(threading.Thread): self.send_queue.put(message.GetData(pack)) self.vectors_requested.update({ vector: time.time() for vector in pack - if vector not in self.vectors_requested}) + }) self.vectors_to_get.difference_update(pack) else: self.send_queue.put(message.GetData(self.vectors_to_get)) self.vectors_requested.update({ vector: time.time() for vector in self.vectors_to_get - if vector not in self.vectors_requested}) + }) self.vectors_to_get.clear() if self.vectors_requested: self.vectors_requested = {