mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-22 19:24:08 +00:00
fix: open_path_ensure deadlock (#424)
* fix: open_path_ensure deadlock * fix: cargo make format
This commit is contained in:
@@ -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, _)) => {
|
||||
|
||||
Reference in New Issue
Block a user