authorgravatar for bblack@wikimedia.orgBrandon Black <bblack@wikimedia.org> 2026-05-05 12:16:14-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-10-10 01:22:25+02:00
log36173dcccf52f909ebb02f81ffcfc9e38f457a50
tree47f82c1ddebfffde4ed69b2a7761582a0ee2f0a5
parent71f6780c98c0f84668385a901bb591d19aa3944d

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
......@@ -2887,7 +2887,7 @@ fn batchAwaitConcurrent(userdata: ?*anyopaque, b: *Io.Batch, timeout: Io.Timeout
28872887 try poll_storage.add(o.socket_handle, posix.POLL.IN | posix.POLL.ERR);
28882888 break :nb;
28892889 },
2890 else => |e| break .{ e, 0 },
2890 else => |e| break .{ e, msg_i },
28912891 };
28922892 data_i += msg.data.len;
28932893 } else .{ null, o.message_buffer.len } };