GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow configuration of TCP keepalive for NIO TCP connections · Issue #420 · dnsjava/dnsjava

Allow configuration of TCP keepalive for NIO TCP connections #420

New issue
Copy link
New issue
Copy link
Open
Open
Allow configuration of TCP keepalive for NIO TCP connections#420
Copy link
Labels
enhancementvolunteer wanted

Description

@MarioGoupil
MarioGoupil
opened on Oct 3, 2026
Issue body actions

When dnsjava receives a truncated UDP response, it retries the query over TCP using NioTcpClient. That created TCP connection may remain open for reuse, but currently there is no way to configure TCP keepalive. A firewall or other network device may silently drop an idle connection, causing later queries that reuse it to fail.
Enabling SO_KEEPALIVE on NIO TCP connections and allowing callers to configure the keepalive timing and probe count would prevent that. Suggested system property names and defaults:

Property Default Socket option
dnsjava.tcp.keepalive true SO_KEEPALIVE
dnsjava.tcp.keepidle 900 seconds TCP_KEEPIDLE
dnsjava.tcp.keepinterval 75 seconds TCP_KEEPINTERVAL
dnsjava.tcp.keepcount 9 probes TCP_KEEPCOUNT

Activity

  1. ibauersachs
    added
    enhancement
    volunteer wanted
    on Oct 20, 2026
  2. ibauersachs commented on Oct 20, 2026

    @ibauersachs
    ibauersachs
    on Oct 20, 2026
    Member
    More actions

    Thanks for the suggestion. While these settings might help, they go into territory of RFC7828 and should probably be implemented together. Would you mind contributing this with a PR?

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

    enhancementvolunteer wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.