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

Force relaying on holepunch aborted #151

Merged
merged 2 commits into from
Oct 2, 2023
Merged

Conversation

andrewosh
Copy link
Contributor

If dht.connect fails with a HOLEPUNCH_ABORTED error, we should mark that peer as forceRelaying = true, which will force all subsequent connection attempts to go through the provided relay (if relayThrough is specified).

Also, when forceRelaying is set, attempts is reset in order to get VERY_HIGH_PRIORITY on the subsequent relay connection attempt.

@andrewosh andrewosh requested a review from mafintosh October 2, 2023 18:42
@mafintosh mafintosh merged commit d3c1314 into main Oct 2, 2023
3 checks passed
@mafintosh mafintosh deleted the relay-on-holepunch-failure branch October 2, 2023 18:56
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