mirror of
https://github.com/uqbar-dao/nectar.git
synced 2025-01-05 08:17:11 +03:00
net: fix crash by correctly removing peer (bug: didnt await)
This commit is contained in:
parent
952282d8b1
commit
aca7985888
@ -151,7 +151,7 @@ pub async fn handle_failed_connection(
|
|||||||
&format!("net: failed to connect to {}", peer_id.name),
|
&format!("net: failed to connect to {}", peer_id.name),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
drop(data.peers.remove(&peer_id.name));
|
data.peers.remove(&peer_id.name).await;
|
||||||
peer_rx.close();
|
peer_rx.close();
|
||||||
while let Some(km) = peer_rx.recv().await {
|
while let Some(km) = peer_rx.recv().await {
|
||||||
utils::error_offline(km, &ext.network_error_tx).await;
|
utils::error_offline(km, &ext.network_error_tx).await;
|
||||||
|
Loading…
Reference in New Issue
Block a user