Send WebSocket close code on disconnect

This commit is contained in:
Andrew Godwin 2016-07-21 11:52:56 -04:00
parent 8619c31cf9
commit 2bb68654fc

View File

@ -165,6 +165,7 @@ class WebSocketProtocol(WebSocketServerProtocol):
if not self.muted:
self.channel_layer.send("websocket.disconnect", {
"reply_channel": self.reply_channel,
"code": code,
"path": self.unquote(self.path),
"order": self.packets_received + 1,
})