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

Allow the start task to be cancelled when already disconnected #615

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Nov 7, 2023

#614 fixed the case were we would cancel the handshake in progress, but it did not account for the race where we have not switched the state to connecting yet because we have not obtained the lock. While I could only get this to happen in a test its likely it possible in the real world if the timing is exactly perfect

#614 fixed the case were we would cancel the handshake in progress, but
it did not account for the race where we have not switched the state
to connecting yet because we have not obtained the lock. While I could
only get this to happen in a test its likely it possible in the
real world if the timing is exactly perfect
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #615 (754a754) into main (2ef9ed9) will increase coverage by 0.45%.
Report is 3 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #615      +/-   ##
==========================================
+ Coverage   77.41%   77.86%   +0.45%     
==========================================
  Files          14       14              
  Lines        2488     2489       +1     
==========================================
+ Hits         1926     1938      +12     
+ Misses        562      551      -11     
Files Coverage Δ
aioesphomeapi/reconnect_logic.py 88.29% <100.00%> (+1.66%) ⬆️

... and 1 file with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@bdraco bdraco marked this pull request as ready for review November 7, 2023 00:15
@bdraco
Copy link
Member Author

bdraco commented Nov 7, 2023

Looks like we are going to end up with nearly full coverage for reconnect logic .. just one retest and PR at a time

@bdraco bdraco merged commit 6458ebc into main Nov 7, 2023
10 checks passed
@bdraco bdraco deleted the stop_callback branch November 7, 2023 00:17
@bdraco bdraco changed the title Allow the stop callback to be cancelled when already disconnected Allow the start task to be cancelled when already disconnected Nov 7, 2023
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.

1 participant