From b91f921927338b1d98200c6cf35ba48d0a3a0153 Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Mon, 3 Nov 2025 19:27:15 -0500 Subject: [PATCH] Reduce RST cancel prefix to 32 bytes --- bellows/ash.py | 2 +- tests/test_ash.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bellows/ash.py b/bellows/ash.py index 1ec0113f..e278006a 100644 --- a/bellows/ash.py +++ b/bellows/ash.py @@ -719,4 +719,4 @@ async def send_data(self, data: bytes) -> None: def send_reset(self) -> None: # Some adapters seem to send a NAK immediately but still process the reset frame - self._write_frame(RstFrame(), prefix=40 * (Reserved.CANCEL,)) + self._write_frame(RstFrame(), prefix=32 * (Reserved.CANCEL,)) diff --git a/tests/test_ash.py b/tests/test_ash.py index d8cd303f..e1071815 100644 --- a/tests/test_ash.py +++ b/tests/test_ash.py @@ -438,7 +438,7 @@ async def test_ash_protocol_startup(caplog): assert ezsp.reset_received.mock_calls == [call(t.NcpResetCode.RESET_SOFTWARE)] assert protocol._write_frame.mock_calls == [ - call(ash.RstFrame(), prefix=40 * (ash.Reserved.CANCEL,)) + call(ash.RstFrame(), prefix=32 * (ash.Reserved.CANCEL,)) ] protocol._write_frame.reset_mock()