Skip to content

Conversation

@Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Oct 24, 2025

Changes

close #7922 - hardens the Akka.Remote EndpointWriter against a larger range of potential serialization failures.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Copy link
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detailed my changes

ByteString pdu;
try
{
pdu = _codec.ConstructMessage(send.Recipient.LocalAddressToUse, send.Recipient,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap all concerns related to outbound serialization in an additional try...catch - throw the inner exception inside a new SerializationException since the outer try...catch knows to log those without disassociating.

LogPossiblyWrappedMessageType(send.Message));
return true;
}
catch (ArgumentException ex)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This additional catch is now redundant given the inner try...catch

Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Arkatufus Arkatufus enabled auto-merge (squash) October 24, 2025 14:45
@Arkatufus Arkatufus merged commit 826fc66 into akkadotnet:dev Oct 24, 2025
11 checks passed
@Aaronontheweb Aaronontheweb deleted the fix-7922 branch October 24, 2025 15:12
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Akka.Remote: strengthen serialization exception handling

2 participants