Skip to content

Commit

Permalink
fix(http): remove connection-specific header field
Browse files Browse the repository at this point in the history
  • Loading branch information
itsusinn committed Feb 1, 2022
1 parent 94706fc commit a145593
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/net.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
use std::time::Duration;

fn default_reqwest_settings() -> reqwest::ClientBuilder {
// maybe we should configure it by ourselves
use reqwest::header::{HeaderMap, CONNECTION};

let mut headers = HeaderMap::new();
headers.insert(CONNECTION, "keep-alive".parse().unwrap());

let connect_timeout = Duration::from_secs(10);
let timeout = connect_timeout + Duration::from_secs(24);

reqwest::Client::builder()
.connect_timeout(connect_timeout)
.timeout(timeout)
.tcp_nodelay(true)
.default_headers(headers)
}
pub fn client_from_config() -> reqwest::Client {
use crate::config::CONFIG;
Expand Down

0 comments on commit a145593

Please sign in to comment.