fix(comms): minor edge-case fix to handle inbound connection while dialing #3785
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.
Description
Motivation and Context
Noticed this edge case when a wallet start up and dials a base node, I then quickly manually dial the wallet from the same base node. The bn->wallet connection finishes first but the wallet still is in connecting state. The wallet does not immediately flip into connected state because it is waiting for the dial to finish, however this will also cause a tie-break resolution which may take longer. This PR resolves this by notifying the dialler of all inbound connections so that it can notify any waiting dials of the new connection immediately.
How Has This Been Tested?
Partially by existing unit tests, manually