prevent infinite loop

This commit is contained in:
Alberto Xamin 2023-01-21 14:53:08 +00:00
parent 28a093d337
commit ca342f0106
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2

View File

@ -811,8 +811,8 @@ import pickle
def save_games():
global save_lock
while True:
sio.sleep(2)
if not save_lock:
sio.sleep(2)
with open('games.pickle', 'wb') as f:
pickle.dump([g for g in games if g.started and not g.is_replay], f)