From 315f491bfbdd0bb04fb8cdb43967b40bfef83d22 Mon Sep 17 00:00:00 2001 From: fun with rust Date: Fri, 13 Feb 2026 11:48:17 +0100 Subject: [PATCH] fix: open_path_ensure deadlock (#424) * fix: open_path_ensure deadlock * fix: cargo make format --- quinn/src/connection.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/quinn/src/connection.rs b/quinn/src/connection.rs index 682395eb2..21e059f6d 100644 --- a/quinn/src/connection.rs +++ b/quinn/src/connection.rs @@ -423,8 +423,14 @@ impl Connection { match open_res { Ok((path_id, existed)) if existed => { match state.open_path.get(&path_id).map(|tx| tx.subscribe()) { - Some(recv) => OpenPath::new(path_id, recv, self.0.clone()), - None => OpenPath::ready(path_id, self.0.clone()), + Some(recv) => { + drop(state); + OpenPath::new(path_id, recv, self.0.clone()) + } + None => { + drop(state); + OpenPath::ready(path_id, self.0.clone()) + } } } Ok((path_id, _)) => {