Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20262] Add non-throwing getters for socket info #4319

Merged

Conversation

jepemi
Copy link
Contributor

@jepemi jepemi commented Jan 29, 2024

Description

In some instances, requesting server info after client connection caused exceptions (transport endpoint is not connected). This behavior was observed after PR #4258.
We now also use ASIO's non-throwing methods for this request, ensuring any errors are appropriately handled.

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
  • Any new/modified methods have been properly documented using Doxygen.
  • Changes are ABI compatible.
  • 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.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

src/cpp/rtps/transport/TCPChannelResourceBasic.h Outdated Show resolved Hide resolved
src/cpp/rtps/transport/TCPTransportInterface.cpp Outdated Show resolved Hide resolved
src/cpp/rtps/transport/TCPTransportInterface.cpp Outdated Show resolved Hide resolved
src/cpp/rtps/transport/TCPChannelResource.h Outdated Show resolved Hide resolved
@jepemi jepemi force-pushed the bugfix/tcp_throw_remote_endpoint_not_connected branch from de4a0a4 to 807f8ba Compare January 30, 2024 09:42
@jepemi
Copy link
Contributor Author

jepemi commented Jan 31, 2024

@richiprosima please test this

@jepemi jepemi added this to the v2.13.3 milestone Feb 1, 2024
@EduPonz EduPonz modified the milestones: v2.13.3, v2.13.2 Feb 6, 2024
@JesusPoderoso
Copy link
Contributor

@Mergifyio rebase

Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Signed-off-by: Jesus Perez <jesusperez@eprosima.com>
Copy link
Contributor

mergify bot commented Feb 8, 2024

rebase

✅ Branch has been successfully rebased

@JesusPoderoso JesusPoderoso force-pushed the bugfix/tcp_throw_remote_endpoint_not_connected branch from b8aab93 to fe0ae54 Compare February 8, 2024 11:14
@JesusPoderoso
Copy link
Contributor

@richiprosima please test this

@JesusPoderoso JesusPoderoso added the ci-pending PR which CI is running label Feb 8, 2024
@MiguelCompany MiguelCompany merged commit 6b484da into master Feb 8, 2024
11 of 14 checks passed
@MiguelCompany MiguelCompany deleted the bugfix/tcp_throw_remote_endpoint_not_connected branch February 8, 2024 17:13
cferreiragonz added a commit that referenced this pull request Mar 11, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Mar 11, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Mar 11, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Mar 11, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Mar 15, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Mar 18, 2024
* Protect asio exception hotfix (#4527)

* Refs #20599: Handle error code before function call

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Apply suggestion

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 08193d5)

# Conflicts:
#	src/cpp/rtps/transport/TCPTransportInterface.cpp

* Backport of #4319 && Partial backport of #4300

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
elianalf pushed a commit that referenced this pull request Mar 20, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
EduPonz pushed a commit that referenced this pull request Mar 20, 2024
* Protect asio exception hotfix (#4527)

* Refs #20599: Handle error code before function call

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Apply suggestion

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 08193d5)

# Conflicts:
#	src/cpp/rtps/transport/TCPTransportInterface.cpp

* Backport of #4319 && Partial backport of #4300

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Apr 4, 2024
* Protect asio exception hotfix (#4527)

* Refs #20599: Handle error code before function call

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Apply suggestion

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 08193d5)

* Backport of #4319 && Partial backport of #4300

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request May 27, 2024
* Protect asio exception hotfix (#4527)

* Refs #20599: Handle error code before function call

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Apply suggestion

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 08193d5)

* Backport of #4319 && Partial backport of #4300

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
EduPonz pushed a commit that referenced this pull request May 29, 2024
* Protect asio exception hotfix (#4527)

* Refs #20599: Handle error code before function call

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Apply suggestion

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 08193d5)

# Conflicts:
#	src/cpp/rtps/transport/TCPTransportInterface.cpp

* Backport of #4319 && Partial backport of #4300

* Protect asio exception hotfix (#4527)

* Refs #20599: Handle error code before function call

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Apply suggestion

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 08193d5)

* Backport of #4319 && Partial backport of #4300

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-pending PR which CI is running
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants