From aa8e73fa8ded88aff684d9ec2d1875e65d7809ad Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Sat, 23 Dec 2023 14:37:59 +0100 Subject: [PATCH] fix a crash --- src/server.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server.rs b/src/server.rs index 2d6934dd..411455da 100644 --- a/src/server.rs +++ b/src/server.rs @@ -720,7 +720,9 @@ impl Server { loop { let event = frontend::read_event(&mut stream).await; match event { - Ok(event) => tx.send(event).await.unwrap(), + Ok(event) => { + let _ = tx.send(event).await; + } Err(e) => { if let Some(e) = e.downcast_ref::() { if e.kind() == ErrorKind::UnexpectedEof { @@ -750,7 +752,9 @@ impl Server { loop { let event = frontend::read_event(&mut stream).await; match event { - Ok(event) => tx.send(event).await.unwrap(), + Ok(event) => { + let _ = tx.send(event).await; + } Err(e) => { if let Some(e) = e.downcast_ref::() { if e.kind() == ErrorKind::UnexpectedEof {