From 584b82d4ffcb72e58a8caff68e6251050b99a955 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 0f652f44198f1cc13d4009a09039a6fc49fc97e6..1cf715279bc42aa65eeed56636798ac020bcdb86 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -2877,7 +2877,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