Skip to content

Commit

Permalink
chore(networking): update naming of REQUEST_TIMEOUT_DEFAULT_S
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuef authored and Benno committed Jun 14, 2023
1 parent 858a12a commit f3bf52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sn_networking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ use tracing::warn;
pub(crate) const CLOSE_GROUP_SIZE: usize = 8;

// Timeout for requests sent/received through the request_response behaviour.
const REQUEST_TIMEOUT: Duration = Duration::from_secs(30);
const REQUEST_TIMEOUT_DEFAULT_S: Duration = Duration::from_secs(30);
// Sets the keep-alive timeout of idle connections.
const CONNECTION_KEEP_ALIVE_TIMEOUT: Duration = Duration::from_secs(10);

Expand Down Expand Up @@ -233,7 +233,7 @@ impl SwarmDriver {
let request_response = {
let mut cfg = RequestResponseConfig::default();
let _ = cfg
.set_request_timeout(request_response_timeout.unwrap_or(REQUEST_TIMEOUT))
.set_request_timeout(request_response_timeout.unwrap_or(REQUEST_TIMEOUT_DEFAULT_S))
.set_connection_keep_alive(CONNECTION_KEEP_ALIVE_TIMEOUT);

request_response::Behaviour::new(
Expand Down

0 comments on commit f3bf52d

Please sign in to comment.