-
Notifications
You must be signed in to change notification settings - Fork 523
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: Fix read result not full #3350
Conversation
Signed-off-by: Enwei Jiao <[email protected]>
8c9b045
to
6f62656
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
This PR is wrong, we can't guarantee that the source has enough data. |
I thought this function is supposed to read 'len' bytes? |
This is the documentation of Is there anything different between |
Please note that
It's ok to provide an API called |
|
I see, I will raise a PR to revert this. |
Fixed in #3282 |
After actual testing, it was found that using
self.inner.read
will read data based on the size of internal bytes. By usingself.inner.read_exact
, can read the input buffer size directly.