From 856cffd740bd5d342644cf0bcd912a4e0523c312 Mon Sep 17 00:00:00 2001 From: Ian Mason Date: Mon, 14 Nov 2022 18:15:24 -0800 Subject: [PATCH 1/2] No timeouts while downloading --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 10df346..030760d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -201,10 +201,12 @@ impl AppDelegate for Delegate { "Downloading Town of Us... Please be patient! [{}]", ver_url.1.clone() ); - let zip = reqwest::blocking::get(ver_url.1.clone()) - .unwrap() - .bytes() + let client = reqwest::blocking::Client::builder() + .timeout(None) + .build() .unwrap(); + let zip_request = client.get(ver_url.1.clone()).build().unwrap(); + let zip = client.execute(zip_request).unwrap().bytes().unwrap(); fs::write(download_path.clone(), zip).unwrap(); } From 7f1a6c6bc1f3d2aafd15d56100293c874f7bcd26 Mon Sep 17 00:00:00 2001 From: Ian Mason Date: Mon, 14 Nov 2022 18:20:32 -0800 Subject: [PATCH 2/2] Bump to 2.2.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 281f19d..530eac4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "town-of-us-updater" -version = "2.0.0" +version = "2.2.0" edition = "2021" build = "src/build.rs"