mirror of
https://github.com/project-gauntlet/gauntlet.git
synced 2025-12-23 10:35:53 +00:00
Fix race condition when restarting plugins that leads to crash
This commit is contained in:
parent
56096f84fe
commit
cdcda9fb75
1 changed files with 1 additions and 8 deletions
|
|
@ -34,7 +34,7 @@ impl RunStatusHolder {
|
|||
let mut running_plugins = self.running_plugins.lock().expect("lock is poisoned");
|
||||
|
||||
running_plugins
|
||||
.get(plugin_id)
|
||||
.remove(plugin_id)
|
||||
.expect("value should always exist for specified id")
|
||||
.cancel()
|
||||
}
|
||||
|
|
@ -56,10 +56,3 @@ impl RunStatusGuard {
|
|||
.cancelled_owned()
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for RunStatusGuard {
|
||||
fn drop(&mut self) {
|
||||
let mut running_plugins = self.running_plugins.lock().expect("lock is poisoned");
|
||||
running_plugins.remove(&self.id);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue