From 44e5c2b1d7137cc98fbfa07deea5c9832dcd733b Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 24 Sep 2024 07:13:34 -0700 Subject: [PATCH] Fix plugin runtime (response fn) deadlock --- src-tauri/yaak_plugin_runtime/src/manager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-tauri/yaak_plugin_runtime/src/manager.rs b/src-tauri/yaak_plugin_runtime/src/manager.rs index 6ffe181d..9559f7af 100644 --- a/src-tauri/yaak_plugin_runtime/src/manager.rs +++ b/src-tauri/yaak_plugin_runtime/src/manager.rs @@ -291,8 +291,8 @@ impl PluginManager { } async fn send_and_wait(&self, payload: &InternalEventPayload) -> Result> { - self.send_to_plugins_and_wait(payload, self.plugins.lock().await.clone()) - .await + let plugins = { self.plugins.lock().await.clone() }; + self.send_to_plugins_and_wait(payload, plugins).await } async fn send_to_plugins_and_wait(