Skip to content

Commit

Permalink
fix: create empty context for timeout timer tasks in AsyncTimeout
Browse files Browse the repository at this point in the history
see #682 for details
  • Loading branch information
aleneum committed Aug 13, 2024
1 parent 4d8d103 commit 19f1aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transitions/extensions/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ async def _timeout():
except asyncio.CancelledError:
pass

return asyncio.ensure_future(_timeout())
return asyncio.create_task(_timeout(), context=contextvars.Context())

async def _process_timeout(self, event_data):
_LOGGER.debug("%sTimeout state %s. Processing callbacks...", event_data.machine.name, self.name)
Expand Down

0 comments on commit 19f1aea

Please sign in to comment.