Connecting multiple times to a LE device is working correctly again#884
Merged
zxzxwu merged 2 commits intogoogle:mainfrom Feb 6, 2026
Merged
Connecting multiple times to a LE device is working correctly again#884zxzxwu merged 2 commits intogoogle:mainfrom
zxzxwu merged 2 commits intogoogle:mainfrom
Conversation
zxzxwu
reviewed
Feb 5, 2026
| else: | ||
| # Remove the connection | ||
| del self.classic_connections[connection.peer_address] | ||
| del self.le_connections[connection.peer_address] |
Collaborator
There was a problem hiding this comment.
This doesn't look correct, though I am not sure why link can be None, but it will accidentually drop the connection on the other transport. Maybe we should split if connection := self.find_connection_by_handle(handle): to handle the case find in classic or LE.
Contributor
Author
There was a problem hiding this comment.
I don't know either when link can be None. In any case, this is not covered by the unit tests and is not really relevant to me. But it looked wrong to me, so I corrected it.
However, you are right that it still looks wrong. That's why I split it up as recommended.
2523b35 to
81d9adb
Compare
zxzxwu
approved these changes
Feb 6, 2026
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.
Once you have disconnected from an LE device, it was not possible to reconnect because the connection was not removed from
le_connections.In my test, I got the following error message:
This is now fixed. This was still possible in v0.0.220, but this regression was added in #827.