fix
This commit is contained in:
@@ -75,12 +75,16 @@ impl Server {
|
|||||||
.await
|
.await
|
||||||
.insert(conid, client.clone());
|
.insert(conid, client.clone());
|
||||||
|
|
||||||
|
drop(clients_meta);
|
||||||
|
|
||||||
if let Err(e) = read_loop(&s, public_key, &client).await {
|
if let Err(e) = read_loop(&s, public_key, &client).await {
|
||||||
eprintln!("Failed to handle client: {e}");
|
eprintln!("Failed to handle client: {e}");
|
||||||
} else {
|
} else {
|
||||||
println!("Client connection closed")
|
println!("Client connection closed")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut clients_meta = s.clients.lock().await;
|
||||||
|
|
||||||
let mut connections = clients.connections.lock().await;
|
let mut connections = clients.connections.lock().await;
|
||||||
|
|
||||||
connections.remove(&conid);
|
connections.remove(&conid);
|
||||||
|
|||||||
Reference in New Issue
Block a user