Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

dialer: handle dial cancel and/or completion before trying new addresses #96

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jan 23, 2019

Otherwise, we can continue dialing even if we want to stop.

Note: The dials will all get aborted early so this probably isn't causing any significant performance issues.

@ghost ghost assigned Stebalien Jan 23, 2019
@ghost ghost added the status/in-progress In progress label Jan 23, 2019

// We got a result, try again from the top.
continue
default:
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a bunch of duplicated code. Not sure if there's a better way.

Copy link
Member

Choose a reason for hiding this comment

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

The context cancellation check is crucial. Draining responses first before starting more dials is an optimisation, but a welcome one.


// We got a result, try again from the top.
continue
default:
Copy link
Member

Choose a reason for hiding this comment

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

The context cancellation check is crucial. Draining responses first before starting more dials is an optimisation, but a welcome one.

@Stebalien Stebalien merged commit 8f17218 into master Jan 23, 2019
@ghost ghost removed the status/in-progress In progress label Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants