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

tests(s2n-tls-hyper): Check for shutdown type when ignoring NotConnected server errors #4856

Open
goatgoose opened this issue Oct 22, 2024 · 0 comments

Comments

@goatgoose
Copy link
Contributor

Problem:

The hyper client isn't currently capable of shutting down gracefully, so the hyper test server added in #4838 ignores socket NotConnected errors to workaround this. See #4855.

Ideally, this exception for NotConnected errors would be more specific to shutdown. For instance, we wouldn't want to ignore a NotConnected error that occurred during a read. However, the ability to determine if an error occurred at shutdown isn't currently possible. Hyper has a Kind::Shutdown enum value that's associated with the NotConnected error. However, it's not currently possible to access this value with the public APIs.

Hyper provides APIs to check the error kind, such as is_canceled(). A new is_shutdown() API should likely be added for this use case.

Solution:

After this information is accessible from the hyper error, the NotConnected exception should be updated to ensure that the NotConnected error occurred during a shutdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant