mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
ws socket worker: replace unwrap with error return
This commit is contained in:
parent
8bf0e12cb4
commit
14a801f4d4
1 changed files with 5 additions and 1 deletions
|
|
@ -455,7 +455,11 @@ impl<S: futures::AsyncRead + futures::AsyncWrite + Unpin> ConnectionReader<S> {
|
|||
yield_if_needed().await;
|
||||
}
|
||||
|
||||
let message = self.ws_in.next().await.unwrap()?;
|
||||
let message = self
|
||||
.ws_in
|
||||
.next()
|
||||
.await
|
||||
.ok_or_else(|| anyhow::anyhow!("Stream ended"))??;
|
||||
|
||||
match InMessage::from_ws_message(message) {
|
||||
Ok(in_message) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue