Group ref on keepalive

This commit is contained in:
Faris Chebib 2015-09-10 12:04:01 -06:00
parent bd6f61de98
commit 275bfdf1e5

View File

@ -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)