diff --git a/src/rpc/srs.rs b/src/rpc/srs.rs index a6177cf5..581d4ef9 100644 --- a/src/rpc/srs.rs +++ b/src/rpc/srs.rs @@ -299,19 +299,15 @@ async fn transmit( ) -> Result<(), Box> { let mut transmission = Box::pin(transmit_frames(frames, tx)); - loop { - tokio::select! { - result = &mut transmission => { - return result; - } + tokio::select! { + result = &mut transmission => { + result + } - _ = &mut shutdown_signal => { - break; - } + _ = &mut shutdown_signal => { + Ok(()) } } - - Ok(()) } async fn transmit_frames(