Skip to content
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

surface errors when connection reset through pipeline #1758

Closed
wants to merge 1 commit into from

Conversation

weissi
Copy link
Member

@weissi weissi commented Feb 22, 2021

Motivation:

Previously, NIO wouldn't send errors that we pulled out of the socket on
connection reset through the pipeline. That meant that you wouldn't for
example see connect errors.

Modification:

Send errors through the pipeline if the channel is still alive after
trying to read all bytes.

Result:

@weissi
Copy link
Member Author

weissi commented Feb 22, 2021

@Lukasa this isn't actually too bad at all. The real changes required are pretty minor. The cool thing is that my change only does much if the channel is still open after readEOF0. But if we do see an error there, then it'll be closed there and things should be fine because we never get to the new logic. If we do survive readEOF0 without an error, then we should actually surface the error.

This needs much more testing and analysis, therefore still WIP. But I'll do that when I'm actually back at work :)

Motivation:

Previously, NIO wouldn't send errors that we pulled out of the socket on
connection reset through the pipeline. That meant that you wouldn't for
example see connect errors.

Modification:

Send errors through the pipeline if the channel is still alive after
trying to read all bytes.

Result:

More erorrs surfaced to the user.

let pipelineError: Error?
switch error as? ChannelError {
case .some(ChannelError.inputClosed),
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 is obviously ugly, we have a similar issue elsewhere that we have "errors" that aren't errors.

@weissi
Copy link
Member Author

weissi commented Nov 23, 2024

Aged out, closing.

@weissi weissi closed this Nov 23, 2024
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.

NIO doesn't necessarily send ECONNRESET and other errors on reset() through pipeline
1 participant