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:
48
48
async with self ._mutex :
49
49
try :
50
50
if not self .is_connected ():
51
+ self .sync_disconnect ()
51
52
async with async_timeout .timeout (QUEUE_TIMEOUT ):
52
53
_LOGGER .info (f"Connecting to { self .host } " )
53
54
self .transport , _ = await self .loop .create_connection ( # type: ignore
54
55
lambda : self , self .host , 58867
55
56
)
56
57
_LOGGER .info (f"Connected to { self .host } " )
57
58
except Exception as e :
59
+ _LOGGER .warning (f"Failed connecting to { self .host } : { e } " )
58
60
raise RoborockConnectionException (f"Failed connecting to { self .host } " ) from e
59
61
60
62
def sync_disconnect (self ) -> None :
61
- if self .transport and not self . loop . is_closed () :
63
+ if self .transport :
62
64
self .transport .close ()
63
65
64
66
async def async_disconnect (self ) -> None :
You can’t perform that action at this time.
0 commit comments