Repeat READABLE event if there is still data in queue
All checks were successful
/ unit_test (push) Successful in 45s
All checks were successful
/ unit_test (push) Successful in 45s
This commit is contained in:
parent
4bf4bd3870
commit
4a3f8de4ab
1 changed files with 4 additions and 1 deletions
|
@ -1379,7 +1379,10 @@ int ft_recvfrom(struct ipstack *s, int sockfd, void *buf, size_t len, int flags,
|
|||
return 0;
|
||||
return queue_pop(&ts->sock.tcp.rxbuf, buf, len);
|
||||
} else if (ts->sock.tcp.state == TCP_ESTABLISHED) {
|
||||
return queue_pop(&ts->sock.tcp.rxbuf, buf, len);
|
||||
int ret = queue_pop(&ts->sock.tcp.rxbuf, buf, len);
|
||||
if ((ret > 0) && (queue_len(&ts->sock.tcp.rxbuf) > 0))
|
||||
ts->events |= CB_EVENT_READABLE;
|
||||
return ret;
|
||||
} else { /* Not established */
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue