From 0d74bc0492563adc255f89b939d8daee5ef486e1 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Wed, 14 Feb 2024 15:56:50 +0000 Subject: [PATCH] fix exit condition --- proxy/src/redis/publisher.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxy/src/redis/publisher.rs b/proxy/src/redis/publisher.rs index c3ecc3814a..c46b94443f 100644 --- a/proxy/src/redis/publisher.rs +++ b/proxy/src/redis/publisher.rs @@ -61,6 +61,10 @@ impl RedisPublisherClient { .xread_options(&["neon:endpoints:testing"], &[&id], &opts) .await .unwrap(); + if res.keys.is_empty() { + break; + } + assert_eq!(res.keys.len(), 1); let res = res.keys.pop().unwrap(); assert_eq!(res.key, "neon:endpoints:testing");