Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,7 +59,10 @@ async def send_wss_request():
|
|
59 |
# Receive the response
|
60 |
response = await websocket.recv()
|
61 |
print(f"Received: {response}")
|
62 |
-
|
|
|
|
|
|
|
63 |
# Sleep for 30 minutes before the next iteration
|
64 |
await asyncio.sleep(30 * 60)
|
65 |
|
|
|
59 |
# Receive the response
|
60 |
response = await websocket.recv()
|
61 |
print(f"Received: {response}")
|
62 |
+
|
63 |
+
except websockets.exceptions.ConnectionClosed:
|
64 |
+
print("Connection closed. Reconnecting in 30 minutes.")
|
65 |
+
|
66 |
# Sleep for 30 minutes before the next iteration
|
67 |
await asyncio.sleep(30 * 60)
|
68 |
|