mirror of
https://github.com/django/daphne.git
synced 2025-06-29 01:13:16 +03:00
Send a closure code with the backpressure close
This commit is contained in:
parent
0f1b0b85b6
commit
d9ba4c500a
|
@ -101,7 +101,8 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
||||||
# so drop the connection.
|
# so drop the connection.
|
||||||
self.muted = True
|
self.muted = True
|
||||||
logger.warn("WebSocket force closed for %s due to backpressure", self.reply_channel)
|
logger.warn("WebSocket force closed for %s due to backpressure", self.reply_channel)
|
||||||
self.sendClose()
|
# Send code 1013 "try again later" with close.
|
||||||
|
self.sendClose(code=1013)
|
||||||
else:
|
else:
|
||||||
self.factory.log_action("websocket", "connected", {
|
self.factory.log_action("websocket", "connected", {
|
||||||
"path": self.request.path,
|
"path": self.request.path,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user