mirror of
https://github.com/django/daphne.git
synced 2025-07-14 09:52:17 +03:00
Group ref on keepalive
This commit is contained in:
parent
bd6f61de98
commit
275bfdf1e5
|
@ -105,6 +105,8 @@ so we can hook that up to re-add the channel (it's safe to add the channel to
|
||||||
a group it's already in - similarly, it's safe to discard a channel from a
|
a group it's already in - similarly, it's safe to discard a channel from a
|
||||||
group it's not in)::
|
group it's not in)::
|
||||||
|
|
||||||
|
from channels import Group
|
||||||
|
|
||||||
# Connected to websocket.keepalive
|
# Connected to websocket.keepalive
|
||||||
def ws_keepalive(message):
|
def ws_keepalive(message):
|
||||||
Group("chat").add(message.reply_channel)
|
Group("chat").add(message.reply_channel)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user