nbio: fix posix big send/recv wrongly check if done

This commit is contained in:
Laytan Laats
2026-03-11 22:16:35 +01:00
parent 143a8762a0
commit 273ab7e3bb

View File

@@ -805,7 +805,7 @@ send_exec :: proc(op: ^Operation) -> Op_Result {
op.send.sent += n
if op.send.sent < total {
if n < total {
return send_exec(op)
}
@@ -869,7 +869,7 @@ recv_exec :: proc(op: ^Operation) -> Op_Result {
assert(is_tcp || op.recv.received == 0)
op.recv.received += n
if is_tcp && n != 0 && op.recv.received < total {
if is_tcp && n != 0 && n < total {
return recv_exec(op)
}