mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-20 17:46:51 +08:00
🐛 fix error ws closing
This commit is contained in:
parent
3467eb3c29
commit
2e87c40434
@ -200,8 +200,8 @@ class Driver(BaseDriver):
|
||||
websocket=ws)
|
||||
else:
|
||||
logger.warning("Unknown adapter")
|
||||
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail="adapter not found")
|
||||
await ws.close(code=status.WS_1008_POLICY_VIOLATION)
|
||||
return
|
||||
|
||||
await ws.accept()
|
||||
self._clients[x_self_id] = bot
|
||||
|
Loading…
x
Reference in New Issue
Block a user