Skip to content

Commit

Permalink
Set tcp keepalive to 15 seconds
Browse files Browse the repository at this point in the history
Hopefully fixes #167
  • Loading branch information
Morganamilo committed Feb 2, 2021
1 parent 5e458eb commit 8b63b7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use std::env::var;
use std::fs::File;
use std::io::{stdin, BufRead};
use std::path::{Path, PathBuf};
use std::time::Duration;

use alpm::{set_questioncb, Question, SigLevel, Usage};
#[cfg(feature = "git")]
Expand Down Expand Up @@ -403,7 +404,10 @@ impl Config {
"failed to initialize noconfirm"
);

self.raur = raur::Handle::new_with_url(self.aur_url.join("rpc")?.as_str());
let client = reqwest::Client::builder()
.tcp_keepalive(Duration::new(15, 0))
.build()?;
self.raur = raur::Handle::new_with_settings(client, self.aur_url.join("rpc")?.as_str());

self.fetch = aur_fetch::Handle {
git: self.git_bin.clone().into(),
Expand Down

0 comments on commit 8b63b7a

Please sign in to comment.