at 25.11-pre 608 B view raw
1diff --git a/sanic/server/protocols/websocket_protocol.py b/sanic/server/protocols/websocket_protocol.py 2index beee1d26..5a3e70f2 100644 3--- a/sanic/server/protocols/websocket_protocol.py 4+++ b/sanic/server/protocols/websocket_protocol.py 5@@ -147,7 +147,7 @@ class WebSocketProtocol(HttpProtocol): 6 "".join([f"{k}: {v}\r\n" for k, v in resp.headers.items()]) 7 ).encode() 8 rbody += b"\r\n" 9- if resp.body is not None: 10+ if resp.body: 11 rbody += resp.body 12 rbody += b"\r\n\r\n" 13 await super().send(rbody)