node: Add boolean argument to readSocket to switch between blocking and non-blocking mode

This commit is contained in:
2026-06-02 13:49:22 +02:00
parent 1250375063
commit 38ae508c49
2 changed files with 24 additions and 4 deletions
+1 -1
View File
@@ -1215,7 +1215,7 @@ fn netRead(userdata: ?*anyopaque, fd: net.Socket.Handle, data: [][]u8) net.Strea
if (buffer.len == 0)
continue;
const n = node.readSocket(fd, buffer) catch |err| switch (err) {
const n = node.readSocket(fd, buffer, true) catch |err| switch (err) {
error.InvalidHandle => return error.SocketUnconnected,
};
copied += n;