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

bufio: ReadFrom returns before EOF or error #7611

Closed
rui314 opened this issue Mar 22, 2014 · 3 comments
Closed

bufio: ReadFrom returns before EOF or error #7611

rui314 opened this issue Mar 22, 2014 · 3 comments

Comments

@rui314
Copy link
Member

rui314 commented Mar 22, 2014

What does 'go version' print?
go version devel +3ca54dd30864 Sat Mar 22 11:05:40 2014 -0700 linux/amd64

What steps reproduce the problem?
http://play.golang.org/p/TjtDpeafuU

1. Create bufio.Writer w and io.Reader r
2. Write a few bytes to w (if the internal buffer is empty, it won't reproduce)
3. Call ReadFrom(r)

What happened?
ReadFrom returns when r.Read returns (0, nil).

What should have happened instead?
ReadFrom should continue reading r until r.Read returns (n, <non-nil>).
@adg
Copy link
Contributor

adg commented Mar 23, 2014

Comment 1:

Nasty.
https://golang.org/cl/79110043

Status changed to Started.

@bradfitz
Copy link
Contributor

Comment 2:

This issue was closed by revision 4ffc799.

Status changed to Fixed.

@gopherbot
Copy link

Comment 3:

CL https://golang.org/cl/79110043 references this issue.

@rui314 rui314 added the fixed label Apr 9, 2014
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants