Skip to content

Commit

Permalink
fix(core): queue events from iface if all tasks waiting on that iface…
Browse files Browse the repository at this point in the history
… are gone

this juuust might fix unexplained freezes on hardware
  • Loading branch information
matejcik committed Apr 9, 2024
1 parent e153f03 commit 1c87baf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/trezor/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def close(task: Task) -> None:
"""
for iface in _paused: # pylint: disable=consider-using-dict-items
_paused[iface].discard(task)
for iface in _paused: # pylint: disable=consider-using-dict-items
if not _paused[iface]:
del _paused[iface]
_queue.discard(task)
task.close()
finalize(task, GeneratorExit())
Expand Down

0 comments on commit 1c87baf

Please sign in to comment.