]> Cypherpunks repositories - gostls13.git/commit
bufio: do not cache Read errors
authorGraham Miller <graham.miller@gmail.com>
Mon, 27 Jun 2011 20:12:04 +0000 (16:12 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 27 Jun 2011 20:12:04 +0000 (16:12 -0400)
commitf795bdb979482d967aea05696b0b0229af74d79b
tree73cfa56e0ccb577e875a77f892da520ce355473b
parent3a4a581c49a62ec8c58809c2e108b825bafe6aa0
bufio: do not cache Read errors

Reader previously had cached an error from the underlying reader
and would return it on every subsequent call to Read.  The Reader
will now return the error only once, and subsequent calls will result
in a new Read call to the underlying Reader.

Fixes #1934.

R=bradfitz, rogpeppe, rsc
CC=golang-dev
https://golang.org/cl/4528133
src/pkg/bufio/bufio.go
src/pkg/bufio/bufio_test.go
src/pkg/testing/iotest/reader.go