From 955a90dd71ae1929ada6b05158e15b028e8108e8 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Wed, 10 Jul 2024 13:48:24 +0800 Subject: [PATCH] minor fix Signed-off-by: Bugen Zhao --- src/meta/src/rpc/election/dummy.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(()) }