Skip to content

Commit

Permalink
fix a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
feschber committed Dec 23, 2023
1 parent 4de3ef7 commit aa8e73f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<io::Error>() {
if e.kind() == ErrorKind::UnexpectedEof {
Expand Down Expand Up @@ -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::<io::Error>() {
if e.kind() == ErrorKind::UnexpectedEof {
Expand Down

0 comments on commit aa8e73f

Please sign in to comment.