Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle failures after connect, during startup #483

Merged
merged 8 commits into from
Aug 20, 2022

Conversation

puddly
Copy link
Contributor

@puddly puddly commented Aug 16, 2022

startup internally called disconnect in the event of a failure after connect but during initialization. disconnect cancels the reconnect task.

This can be replicated by yanking out a USB coordinator once to get bellows to start reconnecting, and then yanking it out halfway through startup. This problem does not really affect USB coordinators though: if their serial port is present, they probably will work. Only networked coordinators really end up in a situation where the TCP connection succeeds but the port is unusable.

home-assistant/core#75292

@puddly puddly force-pushed the puddly/bellows-reconnect-fix branch from 0c6987d to 84a2e3b Compare August 19, 2022 22:28
@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2022

Codecov Report

Merging #483 (9d8fb3e) into dev (cb11d6c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #483   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files          51       51           
  Lines        4253     4262    +9     
=======================================
+ Hits         4250     4259    +9     
  Misses          3        3           
Impacted Files Coverage Δ
bellows/uart.py 100.00% <100.00%> (ø)
bellows/zigbee/application.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@puddly puddly merged commit 8328b75 into zigpy:dev Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants