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

Differentiate no addresses error from no good addresses #113

Merged
merged 3 commits into from
Mar 13, 2019

Conversation

anacrolix
Copy link
Contributor

Address filtering is applied before considering returning an error. This adds an extra error if there are no addresses at all to differentiate this. I found this useful as sometimes addresses are filtered for having trailing /p2p components, which was confusing. A later PR may improve that too.

The error check is changed to determine if the backoff could be part of context completion, as opposed to returned by an arbitrary downstream context (but not part of the current context), which I believe to the real intention.

@anacrolix anacrolix requested a review from Stebalien March 8, 2019 04:28
@ghost ghost assigned anacrolix Mar 8, 2019
@ghost ghost added the status/in-progress In progress label Mar 8, 2019
@raulk raulk self-requested a review March 11, 2019 08:41
swarm_dial.go Show resolved Hide resolved
swarm_dial.go Outdated Show resolved Hide resolved
@anacrolix anacrolix changed the title Differentiate no addresses from no good addresses and fix error check Differentiate no addresses from no good addresses Mar 13, 2019
@anacrolix anacrolix changed the title Differentiate no addresses from no good addresses Differentiate no addresses error from no good addresses Mar 13, 2019
@anacrolix
Copy link
Contributor Author

I'll squash this one when it's approved.

@raulk raulk merged commit e20fb5e into master Mar 13, 2019
@ghost ghost removed the status/in-progress In progress label Mar 13, 2019
@raulk
Copy link
Member

raulk commented Mar 13, 2019

@anacrolix Oh well, too late for squashing.

@raulk raulk deleted the no-addresses-ctx-err branch March 13, 2019 11:33
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