Added app to websocket request (#1)
This commit is contained in:
committed by
Miguel Grinberg
parent
7560660ec7
commit
104a7c7d05
@@ -186,6 +186,7 @@ class Sanic:
|
|||||||
|
|
||||||
def response(handler):
|
def response(handler):
|
||||||
async def websocket_handler(request, *args, **kwargs):
|
async def websocket_handler(request, *args, **kwargs):
|
||||||
|
request.app = self
|
||||||
protocol = request.transport.get_protocol()
|
protocol = request.transport.get_protocol()
|
||||||
ws = await protocol.websocket_handshake(request)
|
ws = await protocol.websocket_handshake(request)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user