Skip to content

Commit

Permalink
Fixing bug where large image downloads timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
MPult committed Apr 22, 2023
1 parent adbf5e1 commit 848dc93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::env;
use std::path::PathBuf;
use std::time::Duration;

extern crate pretty_env_logger;
#[macro_use]
Expand Down Expand Up @@ -117,11 +118,13 @@ fn request_sync(bearer_token: String, debug: bool, images: bool) -> Option<AllCh
client = reqwest::blocking::Client::builder()
.cookie_store(true)
.danger_accept_invalid_certs(true) // Used in development to trust a proxy
.timeout(Duration::from_secs(60))
.build()
.expect("Error making Reqwest Client");
} else {
client = reqwest::blocking::Client::builder()
.cookie_store(true)
.timeout(Duration::from_secs(60))
.build()
.expect("Error making Reqwest Client");
}
Expand Down

0 comments on commit 848dc93

Please sign in to comment.