File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -157,10 +157,10 @@ async def connect_loop() -> None:
157157 while True :
158158 try :
159159 await self .connect ()
160- self ._has_connected = True
161- self ._ready_callbacks (self )
162160 if not start_attempt .done ():
163161 start_attempt .set_result (True )
162+ self ._has_connected = True
163+ self ._ready_callbacks (self )
164164 break
165165 except RoborockException as e :
166166 if not start_attempt .done ():
@@ -174,9 +174,10 @@ async def connect_loop() -> None:
174174 self ._logger .exception ("Uncaught error during connect: %s" , e )
175175 break
176176 except asyncio .CancelledError :
177+ self ._logger .debug ("connect_loop was cancelled for device %s" , self .duid )
178+ finally :
177179 if not start_attempt .done ():
178180 start_attempt .set_result (False )
179- self ._logger .debug ("connect_loop was cancelled for device %s" , self .duid )
180181
181182 self ._connect_task = asyncio .create_task (connect_loop ())
182183
You can’t perform that action at this time.
0 commit comments