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

Async tls client fix. New server fixture and tests. Don't rely on close_notify. #294

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

themighty1
Copy link
Member

This PR:

  • introduces fixes in tls-client-async and tests.
  • adds a new tls server fixture (with the existing hyper-based one it was not possible to test certain server behaviour).
  • does not treat absence of close_notify as an error.

@themighty1 themighty1 requested a review from sinui0 August 7, 2023 10:14
Copy link
Member

@sinui0 sinui0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm questioning why we require a timer here? I would find it surprising if the server simply holds the connection open after the client sends a close notify and closes the underlying transport (TCP FIN). In the case that it does hang, the time out functionality can be applied outside this context (in the binary) and probably should be a fatal error.

Building the timeout into the library gives us the platform compatibility problem

components/tls/tls-client-async/src/lib.rs Outdated Show resolved Hide resolved
components/tls/tls-client-async/src/lib.rs Outdated Show resolved Hide resolved
components/tls/tls-client-async/tests/test.rs Outdated Show resolved Hide resolved
components/tls/tls-client-async/tests/test.rs Outdated Show resolved Hide resolved
@themighty1
Copy link
Member Author

thanks, I agree that it is better to handle the timeout in the outer context, I removed it.

@themighty1 themighty1 requested a review from sinui0 August 8, 2023 07:58
Copy link
Member

@sinui0 sinui0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@themighty1 themighty1 force-pushed the fix/tls_async_client_close_notify branch from d26b0d0 to 05c551f Compare August 14, 2023 06:32
@themighty1 themighty1 merged commit f1841e2 into dev Aug 14, 2023
11 checks passed
@themighty1 themighty1 deleted the fix/tls_async_client_close_notify branch August 14, 2023 06:42
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.

2 participants