mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
fix(updater): fix typo, keep client instance
This commit is contained in:
@@ -459,16 +459,14 @@ impl<R: Runtime> Update<R> {
|
||||
headers.insert("Accept".into(), "application/octet-stream".into());
|
||||
headers.insert("User-Agent".into(), "tauri/updater".into());
|
||||
|
||||
let client = ClientBuilder::new().build()?;
|
||||
// Create our request
|
||||
let response = ClientBuilder::new()
|
||||
.build()?
|
||||
.send(
|
||||
HttpRequestBuilder::new("GET", self.download_url.as_str())?
|
||||
.headers(headers)
|
||||
// wait 20sec for the firewall
|
||||
.timeout(20),
|
||||
)
|
||||
.await?;
|
||||
let req = HttpRequestBuilder::new("GET", self.download_url.as_str())?
|
||||
.headers(headers)
|
||||
// wait 20sec for the firewall
|
||||
.timeout(20);
|
||||
|
||||
let response = client.send(req).await?;
|
||||
|
||||
// make sure it's success
|
||||
if !response.status().is_success() {
|
||||
|
||||
@@ -42,7 +42,7 @@ pub enum Error {
|
||||
#[error("Unable to extract the new version: {0}")]
|
||||
Extract(String),
|
||||
/// Updater is not supported for current operating system or platform.
|
||||
#[error("Unsuported operating system or platform")]
|
||||
#[error("Unsupported operating system or platform")]
|
||||
UnsupportedPlatform,
|
||||
/// Public key found in `tauri.conf.json` but no signature announced remotely.
|
||||
#[error("Signature not available, skipping update")]
|
||||
|
||||
Reference in New Issue
Block a user