mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-02 18:51:31 +08:00
Fix Quart WebSocket close test app - add missing accept()
WebSocket connections must be accepted before they can be closed. Added await websocket.accept() before await websocket.close(code).
This commit is contained in:
parent
65ba40b243
commit
cbba5cb302
@ -206,5 +206,5 @@ async def ws_close():
|
|||||||
if param.startswith("code="):
|
if param.startswith("code="):
|
||||||
code = int(param.split("=")[1])
|
code = int(param.split("=")[1])
|
||||||
break
|
break
|
||||||
# Quart uses a different close mechanism
|
await websocket.accept()
|
||||||
await websocket.close(code)
|
await websocket.close(code)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user