Fix dangling task for mysensors (#88290)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
5a31bb2ff3
commit
517e88600c
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ async def try_connect(
|
||||||
finally:
|
finally:
|
||||||
if connect_task is not None and not connect_task.done():
|
if connect_task is not None and not connect_task.done():
|
||||||
connect_task.cancel()
|
connect_task.cancel()
|
||||||
asyncio.create_task(gateway.stop())
|
await gateway.stop()
|
||||||
except OSError as err:
|
except OSError as err:
|
||||||
_LOGGER.info("Try gateway connect failed with exception", exc_info=err)
|
_LOGGER.info("Try gateway connect failed with exception", exc_info=err)
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue