holepunchto / hyperswarm

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

Force relaying on holepunch aborted #151

Closed andrewosh closed 9 months ago

andrewosh commented 9 months 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.