mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 13:00:28 +00:00
nbio: fix posix big send/recv wrongly check if done
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user