Skip to content

Commit

Permalink
refactor(client): replace deprecated numeric api with primitive one (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored May 24, 2024
1 parent 3f6a92e commit 6d7da1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client/legacy/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ impl Builder {
h2_builder: hyper::client::conn::http2::Builder::new(exec),
pool_config: pool::Config {
idle_timeout: Some(Duration::from_secs(90)),
max_idle_per_host: std::usize::MAX,
max_idle_per_host: usize::MAX,
},
pool_timer: None,
}
Expand Down
4 changes: 2 additions & 2 deletions src/client/legacy/connect/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,13 @@ fn connect(
}

if let Some(size) = config.send_buffer_size {
if let Err(e) = socket.set_send_buffer_size(size.try_into().unwrap_or(std::u32::MAX)) {
if let Err(e) = socket.set_send_buffer_size(size.try_into().unwrap_or(u32::MAX)) {
warn!("tcp set_buffer_size error: {}", e);
}
}

if let Some(size) = config.recv_buffer_size {
if let Err(e) = socket.set_recv_buffer_size(size.try_into().unwrap_or(std::u32::MAX)) {
if let Err(e) = socket.set_recv_buffer_size(size.try_into().unwrap_or(u32::MAX)) {
warn!("tcp set_recv_buffer_size error: {}", e);
}
}
Expand Down

0 comments on commit 6d7da1a

Please sign in to comment.