forked from 0xERR0R/blocky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(resolver): race UDP and TCP when connecting upstream
Inspired by https://en.wikipedia.org/wiki/Happy_Eyeballs this should improve latency and fixes the long standing behavior where a single resolve attempt could take 2x the timeout. UpstreamResolver.Resolve can still take more than the configured timeout so maybe that can be improved by splitting the retry algorithm into its own resolver type.
- Loading branch information
1 parent
825f1dd
commit 3fe4ed1
Showing
3 changed files
with
66 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters