feat(client): Add connect timeout to HttpConnector (#1972)

This takes the same strategy as golang, where the timeout value is
divided equally between the candidate socket addresses.

If happy eyeballs is enabled, the division takes place "below" the
IPv4/IPv6 partitioning.
This commit is contained in:
Steven Fackler
2019-10-14 14:48:17 -04:00
committed by Sean McArthur
parent 536b1e184e
commit 4179297ac9
2 changed files with 53 additions and 16 deletions

View File

@@ -235,6 +235,10 @@ impl IpAddrs {
pub(super) fn is_empty(&self) -> bool {
self.iter.as_slice().is_empty()
}
pub(super) fn len(&self) -> usize {
self.iter.as_slice().len()
}
}
impl Iterator for IpAddrs {