fix: prevent deadlock by releasing node_handle lock before requesting sync in join_community
This commit is contained in:
parent
197d8ec16c
commit
8f494fcc60
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue