Django channels

149 views
Skip to first unread message

zidan....@gmail.com

unread,
Sep 22, 2020, 5:57:32 AM9/22/20
to Django users
Hi there . its my first time to post on this comunity and i'm very happy to to do that. 

I'm using djnago channels `AsyncWebsocketConsumer` consumer . pay attention to `receive` method in my code .in  i cant understand why this code block `await self.channel_layer.group_send` called after this line `raise APIException`. i found out this issue  when i send a message to websocket  and channels raises this error:

`File "/home/vahid/LEARNING/Python/dayachat/.venv/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 2216, in sendMessage
    raise Disconnected("Attempt to send on a closed protocol")
autobahn.exception.Disconnected: Attempt to send on a closed protocol`


thanks guys.

Reply all
Reply to author
Forward
0 new messages