File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -715,4 +715,8 @@ async def send_data(self, data: bytes) -> None:
715715 )
716716
717717 def send_reset (self ) -> None :
718+ # Some adapters seem to send a NAK immediately but still process the reset frame
719+ # if one eventually makes it through
720+ self ._write_frame (RstFrame (), prefix = (Reserved .CANCEL ,))
721+ self ._write_frame (RstFrame (), prefix = (Reserved .CANCEL ,))
718722 self ._write_frame (RstFrame (), prefix = (Reserved .CANCEL ,))
Original file line number Diff line number Diff line change @@ -438,7 +438,10 @@ async def test_ash_protocol_startup(caplog):
438438
439439 assert ezsp .reset_received .mock_calls == [call (t .NcpResetCode .RESET_SOFTWARE )]
440440 assert protocol ._write_frame .mock_calls == [
441- call (ash .RstFrame (), prefix = (ash .Reserved .CANCEL ,))
441+ # We send three
442+ call (ash .RstFrame (), prefix = (ash .Reserved .CANCEL ,)),
443+ call (ash .RstFrame (), prefix = (ash .Reserved .CANCEL ,)),
444+ call (ash .RstFrame (), prefix = (ash .Reserved .CANCEL ,)),
442445 ]
443446
444447 protocol ._write_frame .reset_mock ()
You can’t perform that action at this time.
0 commit comments