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

Add support for timeout on getting the next ssl record for a connection #327

Merged
merged 3 commits into from
Oct 18, 2024

Conversation

npmenard
Copy link
Member

No description provided.

@npmenard npmenard marked this pull request as ready for review October 16, 2024 17:23
@npmenard npmenard requested a review from a team as a code owner October 16, 2024 17:23
Copy link
Member

@gvaradarajan gvaradarajan left a comment

Choose a reason for hiding this comment

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

Had a couple questions

}
Err(e) => {
let _ = state.error.insert(e);
if state.error.as_ref().unwrap().kind() == std::io::ErrorKind::WouldBlock {
Copy link
Member

Choose a reason for hiding this comment

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

match statement instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point

log::debug!("intermetidate timer expired");
return 2;
}
if now > *self.fin.as_ref().unwrap() {
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we check fin before intermediate?

Copy link
Member Author

Choose a reason for hiding this comment

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

nice catch that was really wrong :)

@@ -426,24 +510,24 @@ impl SSLContext {
}
}

pub struct SSLStream<S> {
pub(crate) struct SSLStream<S> {
Copy link
Member

Choose a reason for hiding this comment

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

this is holding a pointer and interacting with it in an unsafe way, is it ok that you don't have a drop implementation for de-allocating the memory behind the pointer?

Copy link
Member Author

Choose a reason for hiding this comment

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

if you are talking about bio_ptr it should be dropped on line 519

Copy link
Member

Choose a reason for hiding this comment

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

Ah I missed that, my bad

Copy link
Member

@gvaradarajan gvaradarajan left a comment

Choose a reason for hiding this comment

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

LGTM

@npmenard npmenard merged commit 2aa6902 into viamrobotics:main Oct 18, 2024
6 checks passed
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