refactor(admin): Release handle lock before command execution

Change admin service handle to SyncRwLock and copy the handler

function pointer before awaiting execution to prevent deadlock.
This commit is contained in:
Jade Ellis committed 2026-10-28 21:45:18 +00:00
1 parent 35d606eeb7
commit 938b3d2825
3 files changed
+13 -15

No files matched your search

+2 -2
View File
@@ -25,7 +25,7 @@ pub(crate) async fn run(services: Arc<Services>) -> Result<()> {
debug!("Start");
// Install the admin room callback here for now
admin::init(&services.admin).await;
admin::init(&services.admin);
// Setup shutdown/signal handling
let handle = ServerHandle::new();
@@ -60,7 +60,7 @@ pub(crate) async fn run(services: Arc<Services>) -> Result<()> {
_ = sigs.await;
// Remove the admin room callback
admin::fini(&services.admin).await;
admin::fini(&services.admin);
debug_info!("Finish");
res