diff --git a/src/meta/src/rpc/election/dummy.rs b/src/meta/src/rpc/election/dummy.rs index 4af879cbda06..567958dd0860 100644 --- a/src/meta/src/rpc/election/dummy.rs +++ b/src/meta/src/rpc/election/dummy.rs @@ -50,10 +50,8 @@ impl ElectionClient for DummyElectionClient { } async fn run_once(&self, _ttl: i64, mut stop: Receiver<()>) -> MetaResult<()> { - tokio::select! { - _ = stop.changed() => {} - _ = futures::future::pending::<()>() => {} - } + // Only exit when the stop signal is received. + let _ = stop.changed().await; Ok(()) }