cleanup
This commit is contained in:
parent
5f43e53db1
commit
8aeea711eb
|
@ -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")
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user