diff options
Diffstat (limited to 'mumd/src')
| -rw-r--r-- | mumd/src/network.rs | 6 | ||||
| -rw-r--r-- | mumd/src/network/tcp.rs | 2 | ||||
| -rw-r--r-- | mumd/src/network/udp.rs | 2 |
3 files changed, 1 insertions, 9 deletions
diff --git a/mumd/src/network.rs b/mumd/src/network.rs index 9463ad7..6c67b3a 100644 --- a/mumd/src/network.rs +++ b/mumd/src/network.rs @@ -36,14 +36,12 @@ pub enum VoiceStreamType { UDP, } -async fn run_until<F, G>( +async fn run_until<F>( phase_checker: impl Fn(StatePhase) -> bool, fut: F, - mut shutdown: impl FnMut() -> G, mut phase_watcher: watch::Receiver<StatePhase>, ) where F: Future<Output = ()>, - G: Future<Output = ()>, { let (tx, rx) = oneshot::channel(); let phase_transition_block = async { @@ -67,8 +65,6 @@ async fn run_until<F, G>( _ = fut => (), _ = rx => (), }; - - shutdown().await; }; join!(main_block, phase_transition_block); diff --git a/mumd/src/network/tcp.rs b/mumd/src/network/tcp.rs index e639dd0..3a32b9f 100644 --- a/mumd/src/network/tcp.rs +++ b/mumd/src/network/tcp.rs @@ -93,7 +93,6 @@ pub async fn handle( send_packets(sink, &mut packet_receiver), register_events(&mut tcp_event_register_receiver, Arc::clone(&event_queue)), ).map(|_| ()), - || async {}, phase_watcher, ).await; @@ -192,7 +191,6 @@ async fn send_voice( .unwrap(); } }, - || async {}, inner_phase_watcher.clone(), ).await; } diff --git a/mumd/src/network/udp.rs b/mumd/src/network/udp.rs index 9dd6ed3..5f24b51 100644 --- a/mumd/src/network/udp.rs +++ b/mumd/src/network/udp.rs @@ -73,7 +73,6 @@ pub async fn handle( ), new_crypt_state(&mut crypt_state_receiver, sink, source), ).map(|_| ()), - || async {}, phase_watcher, ).await; @@ -217,7 +216,6 @@ async fn send_voice( sink.lock().await.send(sending).await.unwrap(); } }, - || async {}, phase_watcher.clone(), ).await; } |
