From daca366ea76584afa3d17a3aad4c830cd9aba1a9 Mon Sep 17 00:00:00 2001 From: Kevin King <4kevinking@gmail.com> Date: Mon, 11 Oct 2021 19:39:56 -0700 Subject: [PATCH] try keepalive on artifact url endpoint --- src/api.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api.rs b/src/api.rs index 3aae46f..190b19a 100644 --- a/src/api.rs +++ b/src/api.rs @@ -122,7 +122,9 @@ impl ApiClient { args: &PushQueryParams, hash: String, ) -> Result { - let client = reqwest::Client::new(); + let client = reqwest::ClientBuilder::new() + .tcp_keepalive(Some(std::time::Duration::from_secs(2 * 60 * 60))) + .build()?; let tok = self.token()?.clone(); let scheduler_host = self.get_scheduler_host().clone();