diff --git a/src/client/connect/http.rs b/src/client/connect/http.rs index afe7b155eb..a3acca8082 100644 --- a/src/client/connect/http.rs +++ b/src/client/connect/http.rs @@ -521,7 +521,7 @@ struct ConnectingTcpRemote { impl ConnectingTcpRemote { fn new(addrs: dns::SocketAddrs, connect_timeout: Option) -> Self { - let connect_timeout = connect_timeout.map(|t| t / (addrs.len() as u32)); + let connect_timeout = connect_timeout.map(|t| t.checked_div(addrs.len() as u32)).flatten(); Self { addrs,