Skip to content

Commit f6586be

Browse files
committed
Explicitly disable proxy when sending args
This is supposed to always be same machine communication Issue #289
1 parent 9638dd2 commit f6586be

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src-tauri/src/ipc.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,13 @@ impl Ipc {
434434
}
435435

436436
pub async fn send(&self, args: &Vec<String>, app: AppHandle) -> Result<(), String> {
437-
let client = app.state::<reqwest::Client>();
437+
let client = reqwest::Client::builder()
438+
.connect_timeout(Duration::from_secs(3))
439+
.read_timeout(Duration::from_secs(10))
440+
.timeout(Duration::from_secs(10))
441+
.no_proxy()
442+
.build()
443+
.expect("Failed to initialize http client");
438444

439445
let req = client
440446
.post(format!("http://{ADDRESS}/args"))

0 commit comments

Comments
 (0)