Skip to content

Commit

Permalink
Merge pull request #174 from SchuesslingNicolas/main
Browse files Browse the repository at this point in the history
Fix for Issue#165: Unhandled exceptions during reconnection
  • Loading branch information
tahvane1 authored Apr 23, 2024
2 parents dad7bf8 + 18522a8 commit 17e2ad7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/jablotron80/jablotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,10 @@ def connect(self) -> None:
except serial.SerialException as ex:
if "timed out" in f'{ex}':
LOGGER.info('Timeout, retrying')
elif "Connection refused" in f'{ex}':
LOGGER.info('Connection refused by remote serial host, retrying')
elif "unreachable" in f'{ex}':
LOGGER.info('Remote serial host is currently unreachable, retrying')
else:
raise

Expand Down

0 comments on commit 17e2ad7

Please sign in to comment.