Skip to content

bufio: ReadFrom returns before EOF or error #7611

@rui314

Description

@rui314
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>).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions