pub(crate) async fn run_connection_attempts<O, I, F>(futures: I) -> Result<O>
Expand description
Runs connection attempt futures.
Accepts iterator of connection attempt futures and runs them until one of them succeeds or all of them fail.
If all connection attempts fail, returns the first error.
This functions starts with one connection attempt and maintains up to five parallel connection attempts if connecting takes time.