Open ramfox opened 1 month ago
This uses the default timeout in hickory, which is 5seconds. After retries in practice this is about 10seconds total
We have timeouts in our implementation of the discovery trait, but we should include timeouts in our DiscoveryTask
(which spawns and runs discovery) so that if other implementations of Discovery don't have timeouts, we have an escape hatch.
Discovery currently works quickly because our current DNS setup works well. But in theory, especially if someone writes a distributed version of discovery, this can be very slow. In the IPFS paradigm, this also often led to confusion—am I not connecting because the address I received from Discovery did not work, OR did Discovery still not respond?
We should ensure we have a reasonable timeout for discovery.