Skip to content

Commit 17e2ad7

Browse files
authored
Merge pull request #174 from SchuesslingNicolas/main
Fix for Issue#165: Unhandled exceptions during reconnection
2 parents dad7bf8 + 18522a8 commit 17e2ad7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

custom_components/jablotron80/jablotron.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,10 @@ def connect(self) -> None:
888888
except serial.SerialException as ex:
889889
if "timed out" in f'{ex}':
890890
LOGGER.info('Timeout, retrying')
891+
elif "Connection refused" in f'{ex}':
892+
LOGGER.info('Connection refused by remote serial host, retrying')
893+
elif "unreachable" in f'{ex}':
894+
LOGGER.info('Remote serial host is currently unreachable, retrying')
891895
else:
892896
raise
893897

0 commit comments

Comments
 (0)