Skip to content

Commit 477e9c0

Browse files
authored
fix(core): Use safe_block_on in mobile proxy (#12514)
fixes #12513
1 parent 82d634f commit 477e9c0

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tauri: "patch:bug"
3+
---
4+
5+
Fixed an issue that caused iOS apps to panic with an async `run()` entrypoint.

crates/tauri/src/protocol/tauri.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fn get_response<R: Runtime>(
122122
for (name, value) in request.headers() {
123123
proxy_builder = proxy_builder.header(name, value);
124124
}
125-
match crate::async_runtime::block_on(proxy_builder.send()) {
125+
match crate::async_runtime::safe_block_on(proxy_builder.send()) {
126126
Ok(r) => {
127127
let mut response_cache_ = response_cache.lock().unwrap();
128128
let mut response = None;
@@ -134,7 +134,7 @@ fn get_response<R: Runtime>(
134134
} else {
135135
let status = r.status();
136136
let headers = r.headers().clone();
137-
let body = crate::async_runtime::block_on(r.bytes())?;
137+
let body = crate::async_runtime::safe_block_on(r.bytes())?;
138138
let response = CachedResponse {
139139
status,
140140
headers,

0 commit comments

Comments
 (0)