From 65e8183817912fa17445c193ebc1efb46aa0761a Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 Jan 2024 04:10:47 +0200 Subject: [PATCH] add servers cleanup by timeout --- pymaster.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pymaster.py b/pymaster.py index fd4539d..e6428d2 100755 --- a/pymaster.py +++ b/pymaster.py @@ -92,6 +92,11 @@ class PyMaster: for i in self.serverList: + # Cleanup servers by timeout + if time() > i.die: + self.serverList.remove(i) + continue + # Use pregenerated address string packet += i.queryAddr