fix: prevent deadlock by releasing node_handle lock before requesting sync in join_community

This commit is contained in:
cloudwithax 2026-02-16 17:17:26 -05:00
parent 197d8ec16c
commit 8f494fcc60
1 changed files with 4 additions and 0 deletions

View File

@ -272,6 +272,10 @@ pub async fn join_community(
.await;
}
// drop the node_handle lock before calling request_sync to avoid deadlock
// request_sync tries to acquire its own node_handle lock
drop(node_handle);
// request a snapshot now so joins work even when peers were already connected
request_sync(&state).await;