diff options
| author | Eskil Queseth <eskilq@kth.se> | 2021-03-31 21:50:50 +0200 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2021-03-31 21:50:50 +0200 |
| commit | 46a3938b6d9d81649e38e6e793599a52991d803d (patch) | |
| tree | 0ba20ba532d325bf072969013fe8cf5bde84f6ba /mumd/src/network/tcp.rs | |
| parent | 69f189fd45b410be2db3c77e2a4bfa6d9ad8946d (diff) | |
| download | mum-46a3938b6d9d81649e38e6e793599a52991d803d.tar.gz | |
tyrbofish ?
Diffstat (limited to 'mumd/src/network/tcp.rs')
| -rw-r--r-- | mumd/src/network/tcp.rs | 9 |
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>(()))?; } } |
