File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -48,17 +48,19 @@ async def async_connect(self) -> None:
4848 async with self ._mutex :
4949 try :
5050 if not self .is_connected ():
51+ self .sync_disconnect ()
5152 async with async_timeout .timeout (QUEUE_TIMEOUT ):
5253 _LOGGER .info (f"Connecting to { self .host } " )
5354 self .transport , _ = await self .loop .create_connection ( # type: ignore
5455 lambda : self , self .host , 58867
5556 )
5657 _LOGGER .info (f"Connected to { self .host } " )
5758 except Exception as e :
59+ _LOGGER .warning (f"Failed connecting to { self .host } : { e } " )
5860 raise RoborockConnectionException (f"Failed connecting to { self .host } " ) from e
5961
6062 def sync_disconnect (self ) -> None :
61- if self .transport and not self . loop . is_closed () :
63+ if self .transport :
6264 self .transport .close ()
6365
6466 async def async_disconnect (self ) -> None :
You can’t perform that action at this time.
0 commit comments