Unexpected error exception handling
This commit is contained in:
parent
19118f9f3c
commit
d37602cfdd
|
@ -548,6 +548,11 @@ class APIConnection:
|
||||||
self._params.address, err)
|
self._params.address, err)
|
||||||
await self._on_error()
|
await self._on_error()
|
||||||
break
|
break
|
||||||
|
except Exception as err:
|
||||||
|
_LOGGER.info("%s: Unexpected error while reading incoming messages: %s",
|
||||||
|
self._params.address, err)
|
||||||
|
await self._on_error()
|
||||||
|
break
|
||||||
|
|
||||||
async def _handle_internal_messages(self, msg: Any) -> None:
|
async def _handle_internal_messages(self, msg: Any) -> None:
|
||||||
if isinstance(msg, pb.DisconnectRequest):
|
if isinstance(msg, pb.DisconnectRequest):
|
||||||
|
|
Loading…
Reference in New Issue