diff --git a/python/src/trezorlib/debuglink.py b/python/src/trezorlib/debuglink.py index c0822c3795..d0a403b060 100644 --- a/python/src/trezorlib/debuglink.py +++ b/python/src/trezorlib/debuglink.py @@ -1032,7 +1032,6 @@ class SessionDebugWrapper(Session): msg = self._session._read() if isinstance(self.client, TrezorClientDebugLink): msg = self.client._filter_message(msg) - self.client.notify_read(msg) return msg def resume(self) -> None: diff --git a/python/src/trezorlib/transport/session.py b/python/src/trezorlib/transport/session.py index 2392f3eed6..3c40440d66 100644 --- a/python/src/trezorlib/transport/session.py +++ b/python/src/trezorlib/transport/session.py @@ -200,7 +200,13 @@ class SessionV1(Session): assert self.client._last_active_session is self if t.TYPE_CHECKING: assert isinstance(self.client.protocol, ProtocolV1Channel) - return self.client.protocol.read() + resp = self.client.protocol.read() + + from ..debuglink import TrezorClientDebugLink + + if isinstance(self.client, TrezorClientDebugLink): + self.client.notify_read(resp) + return resp def init_session(self, derive_cardano: bool | None = None) -> None: if self.id == b"":