-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay Connection#onRemoved while pending (#101910)
Today we call `Transport.Connection#onRemoved`, notifying any removed-listeners, when the connection is closed and removed from the `connectedNodes` map. However, it's possible for the connection to be closed while we're still adding it to the map and setting up the listeners, so this now-dead connection will still be found in the `pendingConnections` and may be returned to a future call to `connectToNode` even if this call was made after all the removed-listeners have been called. With this commit we delay calling the removed-listeners until the connection is closed and removed from both the `connectedNodes` and `pendingConnections` maps. Backport of #92546 to 7.17 Relates #100493
- Loading branch information
1 parent
e573c1d
commit 7d975ab
Showing
2 changed files
with
135 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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