Skip to content

net_read_uncompressed_nonblocking exits early on MAX_PACKET_LENGTH #1483

@RichardSteele

Description

@RichardSteele

When net_read_uncompressed_nonblocking detects a packet of maximum length, it returns NET_ASYNC_NOT_READY right away. Looping in this case might save some higher level calls and help with edge-triggered event notification if there is still data to read:

do {
  net_async->mp_status = net_read_packet_nonblocking(net, &len);
  net_async->mp_total_length += len;
  net->where_b += len;
} while (len == MAX_PACKET_LENGTH);

Or is there a specific reason for the early exit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions