fix(tests): graceful shutdown for async tasks

This commit is contained in:
Aram Drevekenin 2024-05-22 09:44:18 +02:00
parent 1c8ebcc53a
commit 58fa259ab3

View File

@ -566,8 +566,9 @@ impl WasmBridge {
task::spawn({ task::spawn({
let mut updates = updates.clone(); let mut updates = updates.clone();
let senders = self.senders.clone(); let senders = self.senders.clone();
let _s = shutdown_sender.clone(); let s = shutdown_sender.clone();
async move { async move {
let _s = s;
for (pid, cid, event) in updates.drain(..) { for (pid, cid, event) in updates.drain(..) {
for (plugin_id, client_id, running_plugin, subscriptions) in &plugins_to_update for (plugin_id, client_id, running_plugin, subscriptions) in &plugins_to_update
{ {