Merge pull request #55 from aequitas/exception

Pass exception to log.exception as it is not called from within an ex…
This commit is contained in:
2020-08-23 09:32:44 +02:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ class DSMRProtocol(asyncio.Protocol):
def connection_lost(self, exc):
"""Stop when connection is lost."""
if exc:
self.log.exception('disconnected due to exception')
self.log.exception('disconnected due to exception', exc_info=exc)
else:
self.log.info('disconnected because of close/abort.')
self._closed.set()