holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.08k stars 87 forks source link

Force relaying on holepunch aborted #151

Closed andrewosh closed 1 year ago

andrewosh commented 1 year ago

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.