Skip to content

net: DialTCP doesn't set TCP keepalive (unlike Dialer.Dial) #49345

@database64128

Description

@database64128

What version of Go are you using (go version)?

All current versions apply.

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Not platform specific.

What did you do?

Call net.DialTCP().

What did you expect to see?

The default 15s TCP keepalive setting is applied to the connection.

What did you see instead?

TCP keepalive is not enabled.

Merging this section into newTCPConn should solve this disparity between net.Dialer.Dial[Context]() and net.DialTCP().

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions