fix(core): Use safe_block_on in mobile proxy (#12514)

fixes #12513
This commit is contained in:
Fabian-Lars
2025-01-25 20:18:46 +01:00
committed by GitHub
parent 82d634f4a9
commit 477e9c0496
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
tauri: "patch:bug"
---
Fixed an issue that caused iOS apps to panic with an async `run()` entrypoint.

View File

@@ -122,7 +122,7 @@ fn get_response<R: Runtime>(
for (name, value) in request.headers() {
proxy_builder = proxy_builder.header(name, value);
}
match crate::async_runtime::block_on(proxy_builder.send()) {
match crate::async_runtime::safe_block_on(proxy_builder.send()) {
Ok(r) => {
let mut response_cache_ = response_cache.lock().unwrap();
let mut response = None;
@@ -134,7 +134,7 @@ fn get_response<R: Runtime>(
} else {
let status = r.status();
let headers = r.headers().clone();
let body = crate::async_runtime::block_on(r.bytes())?;
let body = crate::async_runtime::safe_block_on(r.bytes())?;
let response = CachedResponse {
status,
headers,