mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 01:18:28 +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:
|
def is_busy(self) -> bool:
|
||||||
if utime.ticks_ms() >= self.deadline:
|
if utime.ticks_ms() >= self.deadline:
|
||||||
self.reset()
|
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:
|
def compare(self, state: State) -> bool:
|
||||||
if self.state != state:
|
if self.state != state:
|
||||||
@ -919,12 +927,7 @@ class DialogManager:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def set_state(self, state: State) -> bool:
|
def set_state(self, state: State) -> bool:
|
||||||
if self.workflow is not None:
|
if self.is_busy():
|
||||||
if self.state is None or self.state.finished:
|
|
||||||
self.reset()
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
elif workflow.tasks:
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.state = state
|
self.state = state
|
||||||
|
Loading…
Reference in New Issue
Block a user