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

Potential bug in read_frame if we receive 2 frames ready in the buffer? #111

Open
hbina opened this issue Dec 6, 2022 · 1 comment
Open

Comments

@hbina
Copy link

hbina commented Dec 6, 2022

pub async fn read_frame(&mut self) -> crate::Result<Option<Frame>> {

If we receive 2 complete frames within a single read, we will read the first one and then exit the loop immediately.

@Darksonn
Copy link
Collaborator

Darksonn commented Dec 6, 2022

It seems correct to me. The second frame should be returned on the next call to read_frame.

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

No branches or pull requests

2 participants