Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 638
    • Issues 638
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 92
    • Merge requests 92
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Issues
  • #2334
Closed
Open
Issue created Dec 03, 2020 by Ondřej Surý@ondrejOwner

Add uv timer for TCP connection timeouts

Currently, the TCP connection timeouts is configured using a socket option that varies with the platforms:

  • On Linux, it's TCP_USER_TIMEOUT (in miliseconds)
  • On Windows, it's called TCP_MAXRT (in seconds)
  • On macOS, there are two! socket options: TCP_CONNECTIONTIMEOUT (in seconds) and TCP_RXT_CONNDROPTIME (documented just in the header)
  • On FreeBSD 11 and FreeBSD 12, the option is called TCP_KEEPINIT (in seconds)

Alas, at least OpenBSD and NetBSD doesn't have any socket option like this, so a system-wide default is used (and it can be large) leading to connection callback not being called in quite a long time -> thus the unit test might crash on shutdown because there's dangling nmsocket waiting for connection.

We need to restore the connection timeout handler that will:

  • call uv_close() on the connection uv_tcp_t in the timeout handle forcing the connection callback to be called with the timeout error code
  • properly handle that case where the uv_tcp_t is closed out of order
Assignee
Assign to
Time tracking