mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 12:46:49 +00:00
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:
3 files changed
+13
-15
No files matched your search
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user