From f61cb2b91bc98afa3d3caf5df2dca2930735d363 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Fri, 7 Jun 2024 11:01:53 -0700 Subject: [PATCH] Fixing deadlock in debug window cleanup --- src/debug.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debug.rs b/src/debug.rs index 5e6184c..e41ba77 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -58,8 +58,8 @@ impl DebugContext { }); let this = self.clone(); reader.on_disconnect(move || { - this.section - .map_ref(|section| section.values.lock().remove(id)); + let values = this.section.map_ref(|section| section.values.clone()); + values.lock().remove(id); }); }