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

swarm: move all connection post processing to worker loop #2462

Closed
wants to merge 4 commits into from

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Aug 7, 2023

Required for #2394

@sukunrt sukunrt marked this pull request as draft August 7, 2023 18:44
@sukunrt sukunrt force-pushed the sukun/happy-eyeballs-tcp-3 branch from 6b39900 to b1c30cf Compare September 4, 2023 12:05
@sukunrt sukunrt marked this pull request as ready for review September 4, 2023 12:06
// dialAddr is the actual dial for an addr, indirectly invoked through the limiter
func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr) (transport.CapableConn, error) {
func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr, resCh chan dialResult) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr, resCh chan dialResult) {
func (s *Swarm) dialAddr(ctx context.Context, p peer.ID, addr ma.Multiaddr, resCh chan<- dialResult) {

connected bool
// dq is used to pace dials to different addresses of the peer
dq *dialQueue
// dialsInFlight are the addresses with dials pending completion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not addresses, it's just a counter?

@sukunrt
Copy link
Member Author

sukunrt commented Sep 15, 2023

Closing in favour of #2573

@sukunrt sukunrt closed this Sep 15, 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.

2 participants