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-transport): Map poll_accept errors to documented return value #1743

Merged
merged 5 commits into from
May 2, 2023

Conversation

maddeleine
Copy link
Contributor

@maddeleine maddeleine commented May 2, 2023

Resolved issues:

resolves #1712

Description of changes:

This change fixes our code so that our "accept" functions return what our documentation says they return. Previously they could return both Ok(None) and Err(connection::Error::Closed) to indicate the connection has been closed. Now they return Ok(None) for all errors that indicate the connection was closed.

Call-outs:

Used the #[inline] attribute because this function is small and is called in a different crate than it's defined. I think that's how it's supposed to be used?

Testing:

I manually tested that this change fixed the issue for connection::Error::Closed and connection::Error::IdleTimerExpired.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@maddeleine maddeleine added the bug Something isn't working label May 2, 2023
@maddeleine maddeleine requested a review from camshaft May 2, 2023 19:01
@maddeleine maddeleine merged commit ef20187 into main May 2, 2023
@maddeleine maddeleine deleted the transform_error branch May 2, 2023 20:12
@harrisonkaiser
Copy link

🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants