Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix server purging
  • Loading branch information
nOOb3167 authored and sfan5 committed Mar 18, 2018
1 parent 2f87286 commit 78abbee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server.py
Expand Up @@ -348,9 +348,7 @@ def server_points(server):

def purgeOld(self):
with self.lock:
for server in self.list:
if server["update_time"] < time.time() - app.config["PURGE_TIME"]:
self.list.remove(server)
self.list = [server for server in self.list if time.time() <= server["update_time"] + app.config["PURGE_TIME"]]
self.save()

def load(self):
Expand Down

0 comments on commit 78abbee

Please sign in to comment.