error-handling

This commit is contained in:
meejah 2021-04-07 16:30:54 -06:00
parent b095b6919a
commit 27d7ea85e8

View File

@ -288,7 +288,11 @@ class WebSocketTransitConnection(WebSocketServerProtocol):
if token is None: if token is None:
self._state.bad_token() self._state.bad_token()
else: else:
self._state.got_bytes(payload) 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 disconnect_redundant(self): def disconnect_redundant(self):
# this is called if a buddy connected and we were found unnecessary. # this is called if a buddy connected and we were found unnecessary.