Unexpected error exception handling

This commit is contained in:
Otto Winter 2019-01-19 15:25:58 +01:00
parent 19118f9f3c
commit d37602cfdd
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E

View File

@ -548,6 +548,11 @@ class APIConnection:
self._params.address, err)
await self._on_error()
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:
if isinstance(msg, pb.DisconnectRequest):