mirror of
https://github.com/django/daphne.git
synced 2024-11-22 07:56:34 +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.
|
||||
self.muted = True
|
||||
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:
|
||||
self.factory.log_action("websocket", "connected", {
|
||||
"path": self.request.path,
|
||||
|
|
Loading…
Reference in New Issue
Block a user