mirror of
https://github.com/django/daphne.git
synced 2024-11-22 07:56:34 +03:00
Send WebSocket close code on disconnect
This commit is contained in:
parent
8619c31cf9
commit
2bb68654fc
|
@ -165,6 +165,7 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
||||||
if not self.muted:
|
if not self.muted:
|
||||||
self.channel_layer.send("websocket.disconnect", {
|
self.channel_layer.send("websocket.disconnect", {
|
||||||
"reply_channel": self.reply_channel,
|
"reply_channel": self.reply_channel,
|
||||||
|
"code": code,
|
||||||
"path": self.unquote(self.path),
|
"path": self.unquote(self.path),
|
||||||
"order": self.packets_received + 1,
|
"order": self.packets_received + 1,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user