From c629ee4e08d6753793dc48def6796184769179ee Mon Sep 17 00:00:00 2001 From: hemisputnik Date: Sat, 3 Oct 2026 23:46:30 +0300 Subject: [PATCH] Io.net.Stream: fix read post control data changes --- lib/std/Io/net.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/std/Io/net.zig b/lib/std/Io/net.zig index 7c5ddbde5e9a711f39d250587c1a4fa95922fd3e..4b80d35a016e94a5580d3eae95106ee62e03a396 100644 --- a/lib/std/Io/net.zig +++ b/lib/std/Io/net.zig @@ -1283,11 +1283,10 @@ pub const Stream = struct { /// This is a low-level API that calls the `Io` interface function directly. /// For a higher level API, see `reader`. pub fn read(s: *const Stream, io: Io, data: [][]u8) Reader.Error!usize { - const rc, _ = try (try io.operate(.{ .net_read = .{ + return (try (try io.operate(.{ .net_read = .{ .socket_handle = s.socket.handle, .data = data, - } })).net_read; - return rc; + } })).net_read).data_len; } /// Read with control data. -- 2.54.0