Skip to content

datagram_socket t#recv does not return on empty packet #340

@cdaringe

Description

@cdaringe

problem

⚠️ mediocre code ahead (ref: https://github.com/cdaringe/protohacks/blob/c4e00f6f55b991d780d46f012a460bb8a528c505/lib/server/server.ml#L33-L44)

      let client_addr, r = recv socket buf in
      traceln "ack";

ack is never emitted when empty packets are sent. yes, ack is objectively the wrong debug word in this scenario 😆

image

i'm using linux in docker, so perhaps something with the libuv bindings? in the wireshark snippet above, you can see the service retrying, hoping i'll send them a response, but sure enough, the first time they send me an empty packet, i'm unable to proceed passed recv

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