mirror of
https://github.com/django/daphne.git
synced 2025-04-21 17:22:03 +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
|
||||
group it's not in)::
|
||||
|
||||
from channels import Group
|
||||
|
||||
# Connected to websocket.keepalive
|
||||
def ws_keepalive(message):
|
||||
Group("chat").add(message.reply_channel)
|
||||
|
|
Loading…
Reference in New Issue
Block a user