Commit 622ec0f0 authored by deuce's avatar deuce
Browse files

Fix ret/copied confusion in last commit.

parent 1ca116da
......@@ -190,13 +190,13 @@ static ptrdiff_t js_socket_recv(js_socket_private_t *p, void *buf, size_t len, i
return total;
return ret;
}
if (!(flags & MSG_WAITALL) || p->nonblocking)
if ((!(flags & MSG_WAITALL)) || p->nonblocking)
return ret;
total += copied;
total += ret;
if(total>=(ptrdiff_t)len)
return total;
len-=copied;
buf=((uint8_t *)buf) + copied;
len-=ret;
buf=((uint8_t *)buf) + ret;
if(!socket_check(p->sock,NULL,NULL,0)) {
if (total > 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment