Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ async def echo(websocket):
|
|
| 25 |
elif jm["type"] == "update":
|
| 26 |
if time.time() * 1000 - p[jm["token"]]["time"] >= 1000:
|
| 27 |
await websocket.send(json.dumps({"type": "reconnect"}))
|
| 28 |
-
|
| 29 |
p.update({jm["token"]: jm["data"]})
|
| 30 |
json.dump(p, open("p.json", "w"))
|
| 31 |
players = []
|
|
|
|
| 25 |
elif jm["type"] == "update":
|
| 26 |
if time.time() * 1000 - p[jm["token"]]["time"] >= 1000:
|
| 27 |
await websocket.send(json.dumps({"type": "reconnect"}))
|
| 28 |
+
else:
|
| 29 |
p.update({jm["token"]: jm["data"]})
|
| 30 |
json.dump(p, open("p.json", "w"))
|
| 31 |
players = []
|