From 36173dcccf52f909ebb02f81ffcfc9e38f457a50 Mon Sep 17 00:00:00 2001 From: Brandon Black Date: Tue, 5 May 2026 12:16:14 -0500 Subject: [PATCH] Concurrent recv should return msg_i alongside err If there were multiple potential messages to receive, and some were received successfully before encountering an error, it should report the count of succesful receives along with the error found during the final attempt. --- lib/std/Io/Threaded.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index c81ef369fb203d8f22e98b6b4a5e6472d642fcbe..6968e12e88e61017f944e5a9e5df8905a08e98ae 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -2887,7 +2887,7 @@ fn batchAwaitConcurrent(userdata: ?*anyopaque, b: *Io.Batch, timeout: Io.Timeout try poll_storage.add(o.socket_handle, posix.POLL.IN | posix.POLL.ERR); break :nb; }, - else => |e| break .{ e, 0 }, + else => |e| break .{ e, msg_i }, }; data_i += msg.data.len; } else .{ null, o.message_buffer.len } }; -- 2.54.0