Skip to content

Construction of Connection and creation of FD starts too early #1218

Description

@aonq

Background

This is a follow-up to #1188 , where we identified two problems:

Issue 1 (tracked in #1188): No limit on max concurrent connections — addressed by the max_connections() workaround PR.
Issue 2 (this ticket): Connection (and its underlying socket/FD) is constructed before async_accept completes, meaning every pending accept already holds an open FD.

The Proper Fix

The construction of the Connection should be done inside of the async_accept block; FD needs to be created later.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions