Skip to content

Remove SocketOptionName.KeepAlive setting - #464

Merged
Gsantomaggio merged 3 commits into
mainfrom
remove-socket-keepalive-setting
Mar 20, 2026
Merged

Remove SocketOptionName.KeepAlive setting#464
Gsantomaggio merged 3 commits into
mainfrom
remove-socket-keepalive-setting

Conversation

@Gsantomaggio

@Gsantomaggio Gsantomaggio commented Mar 19, 2026

Copy link
Copy Markdown
Member

Fixes #463

This PR removes explicit TCP keep-alive socket option application to address failures when connecting via DnsEndPoint on .NET 8/Linux (issue #463), while keeping the public SocketOptions.KeepAlive property for compatibility.

Changes:

  • Stop setting SocketOptionName.KeepAlive in Connection.ApplySocketOptions (both default and custom SocketOptions paths).
  • Mark SocketOptions.KeepAlive as obsolete and remove KeepAlive references from docs/examples/tests.
  • Add a system test covering DnsEndPoint connectivity.

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio added this to the 1.11.1 milestone Mar 20, 2026
@Gsantomaggio Gsantomaggio added the bug-fix a pr that fixes a bug label Mar 20, 2026
@Gsantomaggio
Gsantomaggio requested a review from Copilot March 20, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes explicit TCP keep-alive socket option application to address failures when connecting via DnsEndPoint on .NET 8/Linux (issue #463), while keeping the public SocketOptions.KeepAlive property for compatibility.

Changes:

  • Stop setting SocketOptionName.KeepAlive in Connection.ApplySocketOptions (both default and custom SocketOptions paths).
  • Mark SocketOptions.KeepAlive as obsolete and remove KeepAlive references from docs/examples/tests.
  • Add a system test covering DnsEndPoint connectivity.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/asciidoc/api.adoc Removes KeepAlive from the documented default socket options snippet.
docs/ReliableClient/BestPracticesClient.cs Updates example socket options comment to no longer reference KeepAlive.
Tests/SystemTests.cs Adds a system test validating DnsEndPoint can be used in StreamSystemConfig.Endpoints.
Tests/ClientTests.cs Removes usage of SocketOptions.KeepAlive in client socket options test.
RabbitMQ.Stream.Client/StreamSystem.cs Updates StreamSystemConfig.SocketOptions XML docs to remove KeepAlive mention.
RabbitMQ.Stream.Client/SocketOptions.cs Marks KeepAlive obsolete (kept for API compatibility).
RabbitMQ.Stream.Client/PublicAPI.Unshipped.txt Updates public API tracking file ordering for SocketOptions entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread RabbitMQ.Stream.Client/SocketOptions.cs Outdated
Comment thread Tests/SystemTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Gsantomaggio
Gsantomaggio merged commit 60e4921 into main Mar 20, 2026
2 checks passed
@Gsantomaggio
Gsantomaggio deleted the remove-socket-keepalive-setting branch March 20, 2026 08:42
@Gsantomaggio

Copy link
Copy Markdown
Member Author

@bangjiehan will release a patch on Monday

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

Labels

bug-fix a pr that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Since 1.11.0 StreamSystem.Create fails with DnsEndpoint when targeting .NET 8 on Linux

2 participants