]> Cypherpunks repositories - gostls13.git/commit
bufio: fix bug that ReadFrom stops before EOF or error
authorRui Ueyama <ruiu@google.com>
Mon, 24 Mar 2014 18:48:34 +0000 (11:48 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 24 Mar 2014 18:48:34 +0000 (11:48 -0700)
commit4ffc799295fbe564edf1880a5f4317330c59bcb1
tree20bf1df5c9e0a1564da39fe82d7db19192c18bd3
parenta43673cf8a237fa237c179aeb0862215b797b9df
bufio: fix bug that ReadFrom stops before EOF or error

ReadFrom should not return until it receives a non-nil error
or too many contiguous (0, nil)s from a given reader.
Currently it immediately returns if it receives one (0, nil).
Fixes #7611.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/76400048
src/pkg/bufio/bufio.go
src/pkg/bufio/bufio_test.go
src/pkg/bufio/scan.go