From 46a3938b6d9d81649e38e6e793599a52991d803d Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Wed, 31 Mar 2021 21:50:50 +0200 Subject: tyrbofish ? --- mumd/src/network/tcp.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mumd/src/network') 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>(()))?; } } -- cgit v1.2.1