Skip to content
Snippets Groups Projects
Commit f07baf44 authored by rickparrish's avatar rickparrish
Browse files

Fix return value when p->peeked is true

parent 0324ddac
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!328Fix return value when p->peeked is true
Pipeline #4686 passed
......@@ -312,9 +312,9 @@ static ptrdiff_t js_socket_recv(JSContext *cx, js_socket_private_t *p, void *buf
return total;
return ret;
}
if ((!(flags & MSG_WAITALL)) || p->nonblocking)
return ret;
total += ret;
if ((!(flags & MSG_WAITALL)) || p->nonblocking)
return total;
if(total>=(ptrdiff_t)len)
return total;
len-=ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment