aboutsummaryrefslogtreecommitdiff
path: root/net/src/stream
diff options
context:
space:
mode:
Diffstat (limited to 'net/src/stream')
-rw-r--r--net/src/stream/websocket.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/src/stream/websocket.rs b/net/src/stream/websocket.rs
index 9d41626..2626d2f 100644
--- a/net/src/stream/websocket.rs
+++ b/net/src/stream/websocket.rs
@@ -47,7 +47,10 @@ where
pub async fn recv(&mut self) -> Result<C::Item> {
match self.inner.next().await {
- Some(msg) => self.codec.decode(&msg?),
+ Some(msg) => match self.codec.decode(&msg?)? {
+ Some(m) => Ok(m),
+ None => todo!(),
+ },
None => Err(Error::IO(std::io::ErrorKind::ConnectionAborted.into())),
}
}