Fix exception capture.

This commit is contained in:
Yuxin Wang 2018-10-01 00:13:30 -04:00
parent 6d06b7900c
commit 9bd517fd4f

View file

@ -46,7 +46,7 @@ class MessageServer:
self._client_connected(client)
self._connections.add(client)
threading.Thread(target=self._read_message, args=(client,)).start()
except ConnectionAbortedError or OSError as e:
except (ConnectionAbortedError, OSError) as e:
if self._is_running:
# if exception occurred during normal execution
logger.error(e)