prevent infinite loop
This commit is contained in:
parent
28a093d337
commit
ca342f0106
@ -811,8 +811,8 @@ import pickle
|
|||||||
def save_games():
|
def save_games():
|
||||||
global save_lock
|
global save_lock
|
||||||
while True:
|
while True:
|
||||||
if not save_lock:
|
|
||||||
sio.sleep(2)
|
sio.sleep(2)
|
||||||
|
if not save_lock:
|
||||||
with open('games.pickle', 'wb') as f:
|
with open('games.pickle', 'wb') as f:
|
||||||
pickle.dump([g for g in games if g.started and not g.is_replay], f)
|
pickle.dump([g for g in games if g.started and not g.is_replay], f)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user