1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

fix(core): add handle to loop before exiting it - DANGER ZONE

[no changelog]
This commit is contained in:
M1nd3r 2024-08-26 14:24:57 +02:00
parent b3aacf1485
commit 117f3eab73

View File

@ -42,12 +42,10 @@ class GenericSessionContext(Context):
take = self.incoming_message.take()
next_message: Message | None = None
# Take a mark of modules that are imported at this point, so we can
# roll back and un-import any others.
# TODO modules = utils.unimport_begin()
while True:
try:
if await self._handle_message(take, next_message, is_debug_session):
loop.schedule(self.handle())
return
except UnexpectedMessageException as unexpected:
# The workflow was interrupted by an unexpected message. We need to