aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Queseth <eskilq@kth.se>2021-03-31 21:50:50 +0200
committerEskil Queseth <eskilq@kth.se>2021-03-31 21:50:50 +0200
commit46a3938b6d9d81649e38e6e793599a52991d803d (patch)
tree0ba20ba532d325bf072969013fe8cf5bde84f6ba
parent69f189fd45b410be2db3c77e2a4bfa6d9ad8946d (diff)
downloadmum-46a3938b6d9d81649e38e6e793599a52991d803d.tar.gz
tyrbofish ?
-rw-r--r--mumd/src/network/tcp.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/mumd/src/network/tcp.rs b/mumd/src/network/tcp.rs
index 5783cc8..6402a89 100644
--- a/mumd/src/network/tcp.rs
+++ b/mumd/src/network/tcp.rs
@@ -225,21 +225,18 @@ async fn send_voice(
|phase| !matches!(phase, StatePhase::Connected(VoiceStreamType::TCP)),
async {
loop {
- let res: Result<(), ServerSendError> = packet_sender.send(
+ packet_sender.send(
receiver
.lock()
.await
.next()
.await
.expect("No audio stream")
- .into());
- if matches!(res, Err(_)) {
- return res;
- }
+ .into())?;
}
},
inner_phase_watcher.clone(),
- ).await.unwrap_or(Ok(()))?;
+ ).await.unwrap_or(Ok::<(), ServerSendError>(()))?;
}
}