Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix bug in Trio's _read_exactly() #213

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

Merged
merged 1 commit into from
Jun 15, 2020
Merged

Fix bug in Trio's _read_exactly() #213

merged 1 commit into from
Jun 15, 2020

Conversation

mehaase
Copy link
Contributor

@mehaase mehaase commented Jun 4, 2020

Reason for the change

The _read_exactly() method in the Trio driver sometimes fails on large responses, such as query results that contain lots of data.

Description

This method calls Trio's receive_some(n), which I found out can actually
return fewer than n bytes. This is only noticeable on large messages
(query results of around 80KB triggered the issue). The solution is to call
receive_some(...) in a loop until n bytes has been received.

Code examples

n/a

Checklist

References

n/a

This method calls Trio's `receive_some(n)`, which I found out can actually
return fewer than `n` bytes. This is only noticeable on large messages
(query results of around 80KB triggered the issue). The solution is to call
`receive_some(...)` in a loop until `n` bytes has been received.
@gabor-boros gabor-boros merged commit 75c4afe into rethinkdb:master Jun 15, 2020
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