Skip to content

Commit 662832e

Browse files
committed
Fix deadlock in stop_pool method
1 parent 29b04ad commit 662832e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/dbus/manager/manager_3_6/methods.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ pub async fn stop_pool_method(
4848
let action = handle_action!(engine.stop_pool(id, false).await);
4949

5050
if let Ok(StopAction::Stopped(pool_uuid) | StopAction::Partial(pool_uuid)) = action {
51-
match manager.read().await.pool_get_path(&pool_uuid) {
51+
let path = manager.read().await.pool_get_path(&pool_uuid).cloned();
52+
match path {
5253
Some(pool) => {
53-
if let Err(e) = unregister_pool(connection, manager, pool).await {
54+
if let Err(e) = unregister_pool(connection, manager, &pool.as_ref()).await {
5455
warn!("Failed to remove pool with path {pool} from the D-Bus: {e}");
5556
}
5657
}

0 commit comments

Comments
 (0)