Skip to content

Improve socket handling #414

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

Merged
merged 10 commits into from
Apr 24, 2025
Merged

Improve socket handling #414

merged 10 commits into from
Apr 24, 2025

Conversation

Gsantomaggio
Copy link
Member

@Gsantomaggio Gsantomaggio commented Apr 15, 2025

  • Improve socket handling by using the native API socket.Connected instead of a local variable to check if the connection is still open or not
  • Handle the close workflow in a better way
  • Add
  reader = PipeReader.Create(stream, new StreamPipeReaderOptions(leaveOpen: true));
  writer = PipeWriter.Create(stream, new StreamPipeWriterOptions(leaveOpen: true));
  • Add a try catch block to the message handler; in case it fails for any reason, it will be logged.
  • Remove one test. There was a bug, and it was not deterministic. (Many other tests cover the same functions )

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio added this to the 1.8.13 milestone Apr 18, 2025
@Gsantomaggio Gsantomaggio marked this pull request as ready for review April 18, 2025 12:39
@Gsantomaggio
Copy link
Member Author

@jonnepmyra, do you have a chance to test it?

@jonnepmyra
Copy link
Contributor

@jonnepmyra, do you have a chance to test it?

Yes, but won't be able to test until Thursday next week 😔

@Gsantomaggio Gsantomaggio merged commit 902a778 into main Apr 24, 2025
2 checks passed
@Gsantomaggio Gsantomaggio deleted the improve_socket branch April 24, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants