Sending messages to groups in Django Channels 2

前端 未结 3 856
离开以前
离开以前 2020-12-24 09:24

I am completely stuck in that I cannot get group messaging to work with Channels 2! I have followed all tutorials and docs that I could find, but alas I haven\'t found what

3条回答
  •  天命终不由人
    2020-12-24 09:45

    I had a similar issue to this for a while too, though the reason my group_send was not working was because a websocket was not actually connected.

    When testing the dev server reloaded which disconnected the socket, so subsequent calls were not getting run by the consumer. Refreshing the frontend reconnected the socket and group_send started working.

    Though this doesn't directly address the question I hope this might help somebody.

提交回复
热议问题