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

Fix zero size reads for Engine Socket. #1260

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

prbprbprb
Copy link
Collaborator

InputStream explicitly allows zero size reads without blocking or attempting IO. We do this correctly for the fd-socket but missed it for the Engine socket.

Not clear whether zero sized read should trigger a TLS handshake, but it always has on Android so keeping it that way.

Bug manifested as a flaky test hang. Fixed the test to explicitly check corner cases and removed un-needed concurrency.

InputStream explicitly allows zero size reads without attempting
IO or blocking.  We do this correctly for the fd-socket but
missed it for the Engine socket.

Not clear whether zero sized read should trigger a TLS handshake,
but it always has on Android so keeping it that way.

Bug manifested as a flaky test hang.  Fixed the test to
explicitly check corner cases and removed un-needed concurrency.
@tweksteen tweksteen merged commit 4f591b4 into google:master Nov 24, 2024
37 checks passed
@prbprbprb prbprbprb deleted the stream_zero branch November 25, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants