Skip to content

[24549] Remove stale tcp channels#6421

Merged
rsanchez15 merged 5 commits into
masterfrom
remove_stale_tcp_channels
Jun 12, 2026
Merged

[24549] Remove stale tcp channels#6421
rsanchez15 merged 5 commits into
masterfrom
remove_stale_tcp_channels

Conversation

@cferreiragonz

@cferreiragonz cferreiragonz commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces logic to remove stale TCP ACCEPT type channels when the listening operation ends (Asio detects and closes the socket). We can only perform this action on ACCEPT type channels because the re-connection mechanism of the CONNECT type channels rely on detecting stale channels and try to re-establish the connection when data needs to be sent.

@Mergifyio backport 3.2.x 2.14.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A: Any new/modified methods have been properly documented using Doxygen.
  • N/A: Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A: New feature has been added to the versions.md file (if applicable).
  • N/A: New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

…lients

Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz cferreiragonz added this to the v3.6.2 milestone Jun 4, 2026
@cferreiragonz cferreiragonz requested a review from Danipiza June 4, 2026 13:46
@github-actions github-actions Bot added the ci-pending PR which CI is running label Jun 4, 2026
@cferreiragonz cferreiragonz changed the title Remove stale tcp channels [24549] Remove stale tcp channels Jun 4, 2026
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz cferreiragonz requested review from richiprosima and removed request for richiprosima June 5, 2026 07:36
@cferreiragonz cferreiragonz linked an issue Jun 5, 2026 that may be closed by this pull request
1 task
Comment thread test/unittest/transport/TCPv4Tests.cpp Outdated
Comment thread test/unittest/transport/TCPv4Tests.cpp Outdated
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz cferreiragonz requested a review from Danipiza June 5, 2026 11:56
Danipiza
Danipiza previously approved these changes Jun 8, 2026
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
@cferreiragonz cferreiragonz added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed ci-pending PR which CI is running labels Jun 12, 2026
@rsanchez15 rsanchez15 merged commit 8188b41 into master Jun 12, 2026
50 of 56 checks passed
@rsanchez15 rsanchez15 deleted the remove_stale_tcp_channels branch June 12, 2026 05:51
@cferreiragonz

Copy link
Copy Markdown
Contributor Author

@Mergifyio backport 3.2.x 2.14.x

@mergify

mergify Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

backport 3.2.x 2.14.x

✅ Backports have been created

Details

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

Labels

ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leak in TCPChannelResource

3 participants