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

fix(s2n-quic-platform): handle ConnectionReset on Win sockets (#1448) #1662

Merged
merged 1 commit into from
Mar 10, 2023

Conversation

PeteAudinate
Copy link
Contributor

Resolved issues:

Resolves #1448

Description of changes:

As discussed in #1448, Windows raises a ConnectionReset if the remote side executes a hard or abortive close. From the recvfrom API for WSAECONNRESET:

The virtual circuit was reset by the remote side executing a hard or abortive close. The application should close the socket; it is no longer usable. On a UDP-datagram socket this error indicates a previous send operation resulted in an ICMP Port Unreachable message.

Instead of panicing when this happens, we should ignore the error and continue processing entries.

This PR is a copy of the code from #1448 as recommended by @camshaft.

Call-outs:

Testing:

Tested locally to confirm that a ConnectionReset no longer causes a panic.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft
Copy link
Contributor

Thanks for fixing this!

@camshaft camshaft merged commit 36ee44a into aws:main Mar 10, 2023
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.

handle ConnectionReset errors on windows UDP sockets
2 participants