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

Check for connection reset correctly #119

Closed
wants to merge 1 commit into from

Conversation

bjosv
Copy link

@bjosv bjosv commented Aug 23, 2020

During ninenines/gun#241 I got an intermittent fault, that after a lot of tests boiled down to this correction.
It was usually test 6.5.1 that failed, and connection reset by peer was involved.

The type net.OpError actually embeds the type os.SyscallError, which holds the ECONNRESET.

I also added a test to trigger the fault, and to verify the remedy. (verified using GithubActions both on ubuntu and windows)
The test uses real tcp sockets to get an exact behavior in this case, but using real sockets in tests might make people scream, so its optional and can be removed if wanted.
Thanks!

The type net.OpError embeds an os.SyscallError, which
might hold the ECONNRESET value that is checked for.
@bjosv
Copy link
Author

bjosv commented Sep 14, 2020

Hi!
Just tell me if there is a need of more information or if there is any ambiguity about this PR.
I will happily help. Thanks!

@bjosv
Copy link
Author

bjosv commented Aug 3, 2022

Handled via 9b53157

@bjosv bjosv closed this Aug 3, 2022
@bjosv bjosv deleted the connreset_correction branch August 3, 2022 11:19
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.

1 participant