mirror of
https://github.com/de2tla2f/pymaster.git
synced 2024-11-23 11:31:28 +00:00
add servers cleanup by timeout
This commit is contained in:
parent
2b6872e04f
commit
65e8183817
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue