Skip to content

Commit

Permalink
Turn on TCP NO_DELAY by default http-rs#322
Browse files Browse the repository at this point in the history
  • Loading branch information
u5surf committed Dec 7, 2021
1 parent 876912d commit 75c012f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ impl Config {

impl Default for Config {
fn default() -> Self {
HttpConfig::default().into()
let conf: Self = HttpConfig::default().into();
conf.set_tcp_no_delay(true)
}
}

Expand Down Expand Up @@ -122,7 +123,7 @@ impl Config {

/// Set TCP `NO_DELAY`.
///
/// Default: `false`.
/// Default: `true`.
///
/// Note: Does nothing on `wasm-client` (or `native-client` on `wasm32`).
pub fn set_tcp_no_delay(mut self, no_delay: bool) -> Self {
Expand Down

0 comments on commit 75c012f

Please sign in to comment.