aboutsummaryrefslogtreecommitdiffstats
path: root/mumd
diff options
context:
space:
mode:
authorEskil Queseth <eskilq@kth.se>2021-03-26 01:15:55 +0100
committerEskil Queseth <eskilq@kth.se>2021-03-26 01:15:55 +0100
commit5cc61e8d2140280421b5962b2911ebbcc927e9d1 (patch)
tree4826ead4ec8cc5e920f263225c78558f449f650c /mumd
parent169eb4f49f3fd587e9c28f2209b2dd130425d866 (diff)
downloadmum-5cc61e8d2140280421b5962b2911ebbcc927e9d1.tar.gz
re-add error checking
Diffstat (limited to 'mumd')
-rw-r--r--mumd/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mumd/src/main.rs b/mumd/src/main.rs
index 5b22089..18b84b8 100644
--- a/mumd/src/main.rs
+++ b/mumd/src/main.rs
@@ -77,7 +77,8 @@ async fn receive_commands(
reader.filter_map(|buf| async {
buf.ok()
})
- .map(|buf| bincode::deserialize::<Command>(&buf).unwrap())
+ .map(|buf| bincode::deserialize::<Command>(&buf))
+ .filter_map(|e| async { e.ok() })
.filter_map(|command| async {
let (tx, rx) = oneshot::channel();