Skip to content

Capture inner SocketException from IOException. #50

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 2 commits into from
Mar 31, 2025

Conversation

nojaf
Copy link
Collaborator

@nojaf nojaf commented Mar 28, 2025

We noticed in our Sentry logs, that the SocketIO exception might come in a wrapped IOException.

}
catch (IOException e)
{
if (e.InnerException is SocketException)
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be the reverse to maintain behaviour of swallowing socket exceptions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, this was missing a not. A bad port from my end.

@nojaf nojaf requested a review from pauldambra March 31, 2025 11:07
@pauldambra pauldambra merged commit cd82370 into serilog-contrib:master Mar 31, 2025
3 checks passed
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