Fix race condition that causes pairing and unpairing failures#246
Merged
ikalchev merged 1 commit intoikalchev:devfrom May 9, 2020
Merged
Conversation
The mDNS announcement must not be updated until AFTER the final pairing response is sent or homekit will see that the accessory is already paired and assume it should stop pairing as it assumes it lost the race and another controller has paired.
Codecov Report
@@ Coverage Diff @@
## dev #246 +/- ##
==========================================
+ Coverage 62.96% 62.99% +0.02%
==========================================
Files 16 16
Lines 1731 1732 +1
Branches 185 184 -1
==========================================
+ Hits 1090 1091 +1
Misses 589 589
Partials 52 52
|
Contributor
Author
|
With Home Assistant now supporting multiple bridges, I've noticed that paired failed about 20% of the time and finally tracked it down to pairing aborting when the new mdns announcement happens which causes pairing to cancel because it sees the bridge as already paired. |
bdraco
added a commit
to bdraco/home-assistant
that referenced
this pull request
May 12, 2020
Fix race condition that causes pairing and unpairing failures. ikalchev/HAP-python#246 Fix loop on dropped connections that causes temporary stalls and connection loss. ikalchev/HAP-python#249 Fix exception on missing video fields. ikalchev/HAP-python#245
20 tasks
bdraco
added a commit
to home-assistant/core
that referenced
this pull request
May 12, 2020
Fix race condition that causes pairing and unpairing failures. ikalchev/HAP-python#246 Fix loop on dropped connections that causes temporary stalls and connection loss. ikalchev/HAP-python#249 Fix exception on missing video fields. ikalchev/HAP-python#245
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The mDNS announcement must not be updated until AFTER
the final pairing response is sent or homekit will
see that the accessory is already paired and assume
it should stop pairing as it assumes it lost the
race and another controller has paired.
This probably means safe mode can go away but I'm
not 100% sure on that.