authorgravatar for hemisputnik@proton.mehemisputnik <hemisputnik@proton.me> 2026-10-03 23:46:30+03:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-04 18:21:18+02:00
logc629ee4e08d6753793dc48def6796184769179ee
tree7376dece6467f4f5bd094deae7e2493e47d9a3be
parent1252721b8f3d14758b1a5eea5ca0c3aefc1962bf
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

Io.net.Stream: fix read post control data changes


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

lib/std/Io/net.zig+2-3
......@@ -1283,11 +1283,10 @@ pub const Stream = struct {
12831283 /// This is a low-level API that calls the `Io` interface function directly.
12841284 /// For a higher level API, see `reader`.
12851285 pub fn read(s: *const Stream, io: Io, data: [][]u8) Reader.Error!usize {
1286 const rc, _ = try (try io.operate(.{ .net_read = .{
1286 return (try (try io.operate(.{ .net_read = .{
12871287 .socket_handle = s.socket.handle,
12881288 .data = data,
1289 } })).net_read;
1290 return rc;
1289 } })).net_read).data_len;
12911290 }
12921291
12931292 /// Read with control data.