mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 10:03:40 +01:00
Catch more errors
This commit is contained in:
parent
46ee34332d
commit
2b33d0dd71
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ import discord
|
|||
import httpx
|
||||
from config import guilds
|
||||
from fastapi import FastAPI, Header, HTTPException, Request
|
||||
from websockets.exceptions import WebSocketException
|
||||
from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse
|
||||
from starlette.websockets import WebSocket, WebSocketDisconnect
|
||||
|
||||
|
@ -302,7 +303,7 @@ async def bridge_recv(ws: WebSocket, secret: str = Header(None)):
|
|||
|
||||
try:
|
||||
await ws.send_json(data)
|
||||
except WebSocketDisconnect:
|
||||
except (WebSocketDisconnect, WebSocketException):
|
||||
break
|
||||
finally:
|
||||
queue.task_done()
|
||||
|
|
Loading…
Reference in a new issue