summaryrefslogtreecommitdiffstats
path: root/crates/core/tedge_core
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@ifm.com>2022-05-20 12:26:49 +0200
committerMatthias Beyer <matthias.beyer@ifm.com>2022-05-20 13:36:08 +0200
commit97162aa03fabfa1a96d553ae7aba8ae664f046f7 (patch)
treec4099bb627d5a969d4985123a5e8c9d82bc2f5f4 /crates/core/tedge_core
parent2480362aefa2f243c4b0021d578e77ae52f99fb9 (diff)
Drop permit as early as possible
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
Diffstat (limited to 'crates/core/tedge_core')
-rw-r--r--crates/core/tedge_core/src/message_handler.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/core/tedge_core/src/message_handler.rs b/crates/core/tedge_core/src/message_handler.rs
index ba1ff773..61ff5de0 100644
--- a/crates/core/tedge_core/src/message_handler.rs
+++ b/crates/core/tedge_core/src/message_handler.rs
@@ -63,13 +63,13 @@ pub fn make_message_handler(
trace!("Spawning handler!");
tokio::spawn(
async move {
- let _permit = permit;
let read_plug = built_plugin.read().await;
let handled_message =
std::panic::AssertUnwindSafe(read_plug.handle_message(msg))
.catch_unwind()
.instrument(Span::current())
.await;
+ drop(permit);
match handled_message {
Err(panic) => {