Skip to content

close sockets eagerly in Lwt_io.establish_server #225

@c-cube

Description

@c-cube

Currently, at

~close:(fun () -> Lazy.force close) fd);
, it seems that establish_server doesn't close the FDs itself. A server receiving lots of short-lived connections quickly blocks by FD starvation, unless on closes the two channels manually. I think the channels should be closed by establish_server itself by default (or at least providing an optional flag to enable it), à la with_file, etc..

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