From 5b06d18f7b234435bf1cef981653bd392b9660c7 Mon Sep 17 00:00:00 2001 From: "Hatter Jiang@Pixelbook" Date: Mon, 17 May 2021 01:06:07 +0800 Subject: [PATCH] chore: lok --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f5926d2..61011ab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -117,7 +117,7 @@ async fn inner_handle_connection( // Insert the write part of this peer to the peer map. let (tx, rx) = unbounded(); - peer_map.lock().unwrap().insert(addr, tx.clone()); + { peer_map.lock().unwrap().insert(addr, tx.clone()); } let (outgoing, incoming) = ws_stream.split();