mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
fixup! core/webauthn: Allow new workflow to be set after a command response is sent, so that in device tests the next test doesn't fail with ERR_CHANNEL_BUSY while the previous workflow is closing.
This commit is contained in:
parent
c463069895
commit
790178a442
@ -908,7 +908,15 @@ class DialogManager:
|
||||
def is_busy(self) -> bool:
|
||||
if utime.ticks_ms() >= self.deadline:
|
||||
self.reset()
|
||||
return bool(workflow.tasks or self.workflow)
|
||||
|
||||
if self.workflow is None:
|
||||
return bool(workflow.tasks)
|
||||
|
||||
if self.state is None or self.state.finished:
|
||||
self.reset()
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def compare(self, state: State) -> bool:
|
||||
if self.state != state:
|
||||
@ -919,12 +927,7 @@ class DialogManager:
|
||||
return True
|
||||
|
||||
def set_state(self, state: State) -> bool:
|
||||
if self.workflow is not None:
|
||||
if self.state is None or self.state.finished:
|
||||
self.reset()
|
||||
else:
|
||||
return False
|
||||
elif workflow.tasks:
|
||||
if self.is_busy():
|
||||
return False
|
||||
|
||||
self.state = state
|
||||
|
Loading…
Reference in New Issue
Block a user