From 7a85d93d94d11a35fba26ff3583b9be0ac3ae3a7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 23 Mar 2020 15:53:51 +0100 Subject: [PATCH] python/debuglink: properly use session_counter for debuglink transport --- python/src/trezorlib/debuglink.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py index e17beb88c..d7dd4aac8 100644 --- a/python/src/trezorlib/debuglink.py +++ b/python/src/trezorlib/debuglink.py @@ -281,10 +281,12 @@ class TrezorClientDebugLink(TrezorClient): def open(self): super().open() - self.debug.open() + if self.session_counter == 1: + self.debug.open() def close(self): - self.debug.close() + if self.session_counter == 1: + self.debug.close() super().close() def set_filter(self, message_type, callback):