Skip to content

Commit

Permalink
Ensure we hold strong references to tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Feb 13, 2023
1 parent 6449a47 commit 0d5019c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aioesphomeapi/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _cleanup(self) -> None:

if self.on_stop and self._connect_complete:

def _remove_on_stop_task(_fut: asyncio.Future) -> None:
def _remove_on_stop_task(_fut: asyncio.Future[None]) -> None:
"""Remove the stop task from the reconnect loop.
We need to do this because the asyncio does not hold
Expand Down
2 changes: 1 addition & 1 deletion aioesphomeapi/reconnect_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async def stop(self) -> None:
await self._stop_zc_listen()

def stop_callback(self) -> None:
def _remove_stop_task(_fut: asyncio.Future) -> None:
def _remove_stop_task(_fut: asyncio.Future[None]) -> None:
"""Remove the stop task from the reconnect loop.
We need to do this because the asyncio does not hold
Expand Down

0 comments on commit 0d5019c

Please sign in to comment.