Skip to content

Conversation

@Thom747
Copy link
Contributor

@Thom747 Thom747 commented Oct 25, 2023

Pull request

Choose Correct

  • bug
  • feature

Describe the pull request
This PR fixes a problem with the Python implementation of TCPTransport that prevented it from closing its TCP connection if it was created as a client.

As the field _serverSockEventStart is only initialized if the TCPTransport is created as a server, calling close on a client TCPTransport results in an AttributeError before socket.close is called.
Thus, the connection stays alive.

To Reproduce
Create a client TCPTransport, then attempt to call close() on it.

Expected behavior
The TCPTransport should close the underlying socket and thus the TCP connection.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • eRPC Version: v1.11.0

Steps you didn't forgot to do

  • I checked if other PR isn't solving this issue.
  • I read Contribution details and did appropriate actions.
  • PR code is tested.
  • PR code is formatted.
  • Allow edits from maintainers pull request option is set (recommended).

@Hadatko
Copy link
Member

Hadatko commented Nov 19, 2023

Hi, thank you for your PR. I will take a on it soon.

@Thom747 Thom747 requested a review from Hadatko December 4, 2023 12:20
@Hadatko Hadatko added the bug label Dec 4, 2023
@Hadatko Hadatko added this to the 1.13.0 milestone Dec 4, 2023
@MichalPrincNXP MichalPrincNXP merged commit a8a7a0d into EmbeddedRPC:develop Feb 9, 2024
@MichalPrincNXP
Copy link
Member

Thank you the effort

@Thom747 Thom747 deleted the fix-client-tcptransport-close branch November 5, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants