Network reads are available when there are bytes available, not just when there are full packets

This commit is contained in:
K. Lange 2018-05-15 12:39:23 +09:00
parent 3991c55145
commit 91ae45c518

View File

@ -339,6 +339,10 @@ static void socket_alert_waiters(struct socket * sock) {
static int socket_check(fs_node_t * node) {
struct socket * sock = node->device;
if (sock->bytes_available) {
return 0;
}
if (sock->packet_queue->length > 0) {
return 0;
}