aboutsummaryrefslogtreecommitdiffstats
path: root/mumd
diff options
context:
space:
mode:
Diffstat (limited to 'mumd')
-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>(()))?;
}
}