Skip to content

Commit

Permalink
fix: print stack trace on connection reset
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeFoodPixels committed Mar 4, 2024
1 parent 3dd4a7b commit 2c741fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/robovac/tuyalocalapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import struct
import sys
import time
import traceback
from typing import Callable, Coroutine

from cryptography.hazmat.backends.openssl import backend as openssl_backend
Expand Down Expand Up @@ -835,7 +836,7 @@ async def _async_handle_message(self):
self._LOGGER.debug("Incomplete read")
elif isinstance(e, ConnectionResetError):
self._LOGGER.debug(
"Connection reset: {}\n{}".format(e, e.__traceback__)
"Connection reset: {}\n{}".format(e, traceback.format_exc())
)
await self.async_disconnect()

Expand Down

0 comments on commit 2c741fe

Please sign in to comment.