move websocket close to fix memory leak

This commit is contained in:
Abi Raja 2023-12-03 14:04:40 -05:00
parent 3e34c40e73
commit 0cc2c78f55

View File

@ -202,5 +202,5 @@ async def stream_code(websocket: WebSocket):
await websocket.send_json(
{"type": "status", "value": "Image generation failed but code is complete."}
)
finally:
await websocket.close()