Skip to content

tcp: Catch exceptions on recv#997

Merged
BrianJKoopman merged 1 commit intomainfrom
koopman/catch-connection-error-in-tcp-recv
Mar 6, 2026
Merged

tcp: Catch exceptions on recv#997
BrianJKoopman merged 1 commit intomainfrom
koopman/catch-connection-error-in-tcp-recv

Conversation

@BrianJKoopman
Copy link
Copy Markdown
Member

Description

This PR introduces error handling in the TPCInterface.recv method to handle any connection errors that occur during the socket.socket.recv call.

Motivation and Context

Resolves #996.

This only occurs if the network disconnection happens during recv, which was tricky to catch when testing this manually. We're now seeing this in practice and this will enable agents to handle the error and retry.

How Has This Been Tested?

This has not been tested and likely won't until it's deployed on site.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@BrianJKoopman BrianJKoopman merged commit 9d2db2f into main Mar 6, 2026
4 checks passed
@BrianJKoopman BrianJKoopman deleted the koopman/catch-connection-error-in-tcp-recv branch March 6, 2026 20:43
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.

Connection error during TCPInterface.recv crashes agent

1 participant