Skip to content

Commit

Permalink
fix(management): fix page crashing due to channel send error
Browse files Browse the repository at this point in the history
(Should) fix #20
  • Loading branch information
ravenclaw900 committed Nov 6, 2021
1 parent 77cf652 commit 8731174
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/backend/src/sockets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,15 @@ pub async fn socket_handler(socket: warp::ws::WebSocket) {
first_message = false;
} else {
// Quit out of handler
data_send.send(None).await.unwrap();
if data_send.send(None).await.is_err() {
break;
}
}
}
// Send new page/data
data_send.send(Some(req.clone())).await.unwrap();
if data_send.send(Some(req.clone())).await.is_err() {
break;
}
}
});
// Send global message (shown on all pages)
Expand Down
Binary file modified src/frontend/.yarn/install-state.gz
Binary file not shown.

0 comments on commit 8731174

Please sign in to comment.