zigpy / zigpy-znp

TI CC2531, CC13x2, CC26x2 radio support for Zigpy and ZHA
GNU General Public License v3.0
144 stars 40 forks source link

Fail all pending requests during a reset #229

Open puddly opened 8 months ago

puddly commented 8 months ago

If the serial link is slow enough (i.e. a TCP coordinator), it appears that a race condition can arise where a watchdog poll can coincide with an intentional reset request. During a reset, all pending requests should be cancelled.

CC @tube0013

codecov[bot] commented 8 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (fc4a131) 98.07% compared to head (ea87e1c) 98.01%. Report is 1 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #229 +/- ## ========================================== - Coverage 98.07% 98.01% -0.07% ========================================== Files 43 43 Lines 3695 3719 +24 ========================================== + Hits 3624 3645 +21 - Misses 71 74 +3 ``` | [Files](https://app.codecov.io/gh/zigpy/zigpy-znp/pull/229?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | Coverage Δ | | |---|---|---| | [zigpy\_znp/api.py](https://app.codecov.io/gh/zigpy/zigpy-znp/pull/229?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-emlncHlfem5wL2FwaS5weQ==) | `96.63% <100.00%> (+0.07%)` | :arrow_up: | | [zigpy\_znp/exceptions.py](https://app.codecov.io/gh/zigpy/zigpy-znp/pull/229?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-emlncHlfem5wL2V4Y2VwdGlvbnMucHk=) | `100.00% <100.00%> (ø)` | | | [zigpy\_znp/zigbee/application.py](https://app.codecov.io/gh/zigpy/zigpy-znp/pull/229?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-emlncHlfem5wL3ppZ2JlZS9hcHBsaWNhdGlvbi5weQ==) | `94.96% <66.66%> (-0.23%)` | :arrow_down: | | [zigpy\_znp/utils.py](https://app.codecov.io/gh/zigpy/zigpy-znp/pull/229?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-emlncHlfem5wL3V0aWxzLnB5) | `97.82% <80.00%> (-2.18%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.