From be855a80591ba1b8e0ece647b83eb4afeb82128e Mon Sep 17 00:00:00 2001 From: pedrocarlo Date: Thu, 21 Aug 2025 23:02:57 -0300 Subject: [PATCH] IOCompletions: abort other remaining completions if previous one errors --- core/types.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/types.rs b/core/types.rs index cc9c78021..dca2f4bb1 100644 --- a/core/types.rs +++ b/core/types.rs @@ -2480,8 +2480,15 @@ impl IOCompletions { match self { IOCompletions::Single(c) => io.wait_for_completion(c), IOCompletions::Many(completions) => { - for c in completions { - io.wait_for_completion(c)?; + let mut completions = completions.into_iter(); + while let Some(c) = completions.next() { + let res = io.wait_for_completion(c); + if res.is_err() { + for c in completions { + c.abort(); + } + return res; + } } Ok(()) }