From f9d77479d4591db591e3ad16df04f2149e0fd901 Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Wed, 27 Jun 2018 17:15:26 +0200 Subject: [PATCH] fido_u2f: wait until previous u2f workflow ends --- src/apps/fido_u2f/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/fido_u2f/__init__.py b/src/apps/fido_u2f/__init__.py index dcfdf81d1c..158a9d80c4 100644 --- a/src/apps/fido_u2f/__init__.py +++ b/src/apps/fido_u2f/__init__.py @@ -356,12 +356,12 @@ class ConfirmState: if self.action != action or self.checksum != checksum: return False if utime.ticks_ms() >= self.deadline: + if self.workflow is not None: + loop.close(self.workflow) return False return True def setup(self, action: int, checksum: bytes, app_id: bytes) -> None: - if self.workflow is not None: - loop.close(self.workflow) if workflow.workflows: return False