don't close websocket when mailbox is deleted

This made sense for ServerSentEvent channels (which has no purpose once
the channel was gone), but not so much for websockets. And it prevented
testing duplicate-close.
This commit is contained in:
Brian Warner 2016-05-20 11:07:21 -07:00
parent f044ef0efa
commit 399efb374c

View File

@ -194,7 +194,7 @@ class WebSocketRendezvous(websocket.WebSocketServerProtocol):
def _send(event):
self.send("message", message=event)
def _stop():
self._reactor.callLater(0, self.transport.loseConnection)
pass
for old_message in self._mailbox.add_listener(self, _send, _stop):
_send(old_message)