This commit is contained in:
meejah 2021-04-12 09:43:07 -06:00
parent 5f43e53db1
commit 8aeea711eb
2 changed files with 2 additions and 5 deletions

View File

@ -396,6 +396,7 @@ class TransitWebSockets(_Transit, ServerBase, unittest.TestCase):
# should be an immediate error)
with self.assertRaises(Disconnected):
p1.send(b"more message")
self.flush()
def new_protocol(self):
ws_factory = WebSocketServerFactory("ws://localhost:4002")

View File

@ -261,11 +261,7 @@ class WebSocketTransitConnection(WebSocketServerProtocol):
if token is None:
self._state.bad_token()
else:
try:
self._state.got_bytes(payload)
except Exception as e:
log.err("Failed to send to partner: {}".format(e))
self.sendClose(3000, "send to partner failed")
def onClose(self, wasClean, code, reason):
"""