Skip to content

Commit 6df702a

Browse files
committed
Merge branch 'upstream/pr1-fix-connection-hang'
2 parents d66b747 + 1b5b442 commit 6df702a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

aiocomfoconnect/comfoconnect.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from aiocomfoconnect.exceptions import (
3434
AioComfoConnectNotConnected,
3535
AioComfoConnectTimeout,
36+
ComfoConnectNotAllowed,
3637
)
3738
from aiocomfoconnect.properties import Property
3839
from aiocomfoconnect.sensors import Sensor
@@ -113,6 +114,11 @@ async def _reconnect_loop():
113114
# Reconnect when connection has been dropped
114115
_LOGGER.info("We got disconnected. Reconnecting.")
115116

117+
except ComfoConnectNotAllowed as exception:
118+
# Passthrough exception if not allowed (because not registered uuid for example )
119+
connected.set_exception(exception)
120+
return
121+
116122
reconnect_task = self._loop.create_task(_reconnect_loop())
117123
self._tasks.add(reconnect_task)
118124
reconnect_task.add_done_callback(self._tasks.discard)

0 commit comments

Comments
 (0)