From 77c726cf1a3b1c0d484bdb9b09dfd8d97327c935 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 26 Aug 2024 18:37:13 +0000 Subject: [PATCH] Prevent infinite loop --- src/imap/client.rs | 2 +- src/smtp/connect.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imap/client.rs b/src/imap/client.rs index 804d7f3e34..21a84d46af 100644 --- a/src/imap/client.rs +++ b/src/imap/client.rs @@ -239,7 +239,7 @@ impl Client { } } }, - _ = delay_set.join_next() => { + _ = delay_set.join_next(), if !delay_set.is_empty() => { // Delay expired. // // Don't do anything other than adding diff --git a/src/smtp/connect.rs b/src/smtp/connect.rs index b858efd1ee..a8e940df53 100644 --- a/src/smtp/connect.rs +++ b/src/smtp/connect.rs @@ -210,7 +210,7 @@ async fn connect_stream( } } }, - _ = delay_set.join_next() => { + _ = delay_set.join_next(), if !delay_set.is_empty() => { // Delay expired. // // Don't do anything other than adding