fix(ios): fix deadlock during Swift plugin command handling (#15101)

This commit is contained in:
Eden Lundie
2026-03-12 15:27:49 +00:00
committed by GitHub
parent 3f77cc1ee6
commit 2679ddd5eb

View File

@@ -373,12 +373,12 @@ pub(crate) fn run_command<R: Runtime, C: AsRef<str>, F: FnOnce(PluginResponse) +
CStr::from_ptr(payload)
};
if let Some(handler) = PENDING_PLUGIN_CALLS
let handler = PENDING_PLUGIN_CALLS
.get_or_init(Default::default)
.lock()
.unwrap()
.remove(&id)
{
.remove(&id);
if let Some(handler) = handler {
let json = payload.to_str().unwrap();
match serde_json::from_str(json) {
Ok(payload) => {