mirror of
https://github.com/django/daphne.git
synced 2024-11-24 00:43:43 +03:00
send() should not block once connection is closed
This commit is contained in:
parent
bb54f41736
commit
6dcc0d52b3
|
@ -195,6 +195,10 @@ class Server(object):
|
|||
"""
|
||||
Coroutine that jumps the reply message from asyncio to Twisted
|
||||
"""
|
||||
# Don't do anything if the connection is closed
|
||||
if self.connections[protocol].get("disconnected", None):
|
||||
return
|
||||
# Let the protocol handle it
|
||||
protocol.handle_reply(message)
|
||||
|
||||
### Utility
|
||||
|
|
Loading…
Reference in New Issue
Block a user