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)
|
# should be an immediate error)
|
||||||
with self.assertRaises(Disconnected):
|
with self.assertRaises(Disconnected):
|
||||||
p1.send(b"more message")
|
p1.send(b"more message")
|
||||||
|
self.flush()
|
||||||
|
|
||||||
def new_protocol(self):
|
def new_protocol(self):
|
||||||
ws_factory = WebSocketServerFactory("ws://localhost:4002")
|
ws_factory = WebSocketServerFactory("ws://localhost:4002")
|
||||||
|
|
|
@ -261,11 +261,7 @@ class WebSocketTransitConnection(WebSocketServerProtocol):
|
||||||
if token is None:
|
if token is None:
|
||||||
self._state.bad_token()
|
self._state.bad_token()
|
||||||
else:
|
else:
|
||||||
try:
|
self._state.got_bytes(payload)
|
||||||
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):
|
def onClose(self, wasClean, code, reason):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user