authorgravatar for bblack@wikimedia.orgBrandon Black <bblack@wikimedia.org> 2026-05-05 12:16:14-05:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-10 09:12:41+02:00
log584b82d4ffcb72e58a8caff68e6251050b99a955
tree521ec46a694a5d44fcd77fcf68d9cbe2325592d4
parent46173d2e85a576c4ceea7dc3de80538388a9e4de
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/Io/Threaded.zig+1-1
......@@ -2877,7 +2877,7 @@ fn batchAwaitConcurrent(userdata: ?*anyopaque, b: *Io.Batch, timeout: Io.Timeout
28772877 try poll_storage.add(o.socket_handle, posix.POLL.IN | posix.POLL.ERR);
28782878 break :nb;
28792879 },
2880 else => |e| break .{ e, 0 },
2880 else => |e| break .{ e, msg_i },
28812881 };
28822882 data_i += msg.data.len;
28832883 } else .{ null, o.message_buffer.len } };