iroh
iroh copied to clipboard
feat: retry nodes in downloader
Description
adds retries to #2085:
- after a node fails to dial, or fails during a transfer with IO errors, we move the node into a delay queue, with an increasing timeout. once the delay expires, the node may be dialed again.
- if the head of the download queue can only proceed with nodes which are currently in the retry queue, we park the download in a separate set from the main queue, and proceed with the next download
- once a retrying node succeeds to reconnect, we unpark all parked hashes for which this node is a candidate
Notes & open questions
Has a smoke test for retry behavior. Adding more tests would be great.
Change checklist
- [ ] Self-review.
- [ ] Documentation updates if relevant.
- [ ] Tests if relevant.