mirror of
https://github.com/nab138/isideload.git
synced 2026-03-02 06:26:16 +01:00
Add timeout to provisioning socket connection
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1831,7 +1831,7 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
||||
|
||||
[[package]]
|
||||
name = "isideload"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
dependencies = [
|
||||
"aes 0.9.0-rc.4",
|
||||
"aes-gcm",
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "isideload"
|
||||
description = "Sideload iOS/iPadOS applications"
|
||||
license = "MIT"
|
||||
authors = ["Nicholas Sharp <nab@nabdev.me>"]
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
edition = "2024"
|
||||
repository = "https://github.com/nab138/isideload"
|
||||
documentation = "https://docs.rs/isideload"
|
||||
|
||||
@@ -8,6 +8,7 @@ use plist_macro::plist;
|
||||
use reqwest::header::{CONTENT_TYPE, HeaderMap, HeaderValue};
|
||||
use rootcause::prelude::*;
|
||||
use serde::Deserialize;
|
||||
use tokio::time::{Duration, timeout};
|
||||
use tokio_tungstenite::tungstenite::Message;
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
@@ -238,7 +239,13 @@ impl RemoteV3AnisetteProvider {
|
||||
.replace("http://", "ws://");
|
||||
|
||||
debug!("Starting provisioning at {}", websocket_url);
|
||||
let (mut ws_stream, _) = tokio_tungstenite::connect_async(&websocket_url).await?;
|
||||
let (mut ws_stream, _) = timeout(
|
||||
Duration::from_secs(10),
|
||||
tokio_tungstenite::connect_async(&websocket_url),
|
||||
)
|
||||
.await
|
||||
.context("Failed to connect to provisioning socket")?
|
||||
.context("Failed to connect to provisioning socket")?;
|
||||
|
||||
debug!("Connected to provisioning socket");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user