diff --git a/src/pkg/bufio/bufio.go b/src/pkg/bufio/bufio.go index 6a73c41ef5..e73f082890 100644 --- a/src/pkg/bufio/bufio.go +++ b/src/pkg/bufio/bufio.go @@ -392,7 +392,7 @@ func (b *Writer) Write(p []byte) (nn int, err os.Error) { } n = b.Available() } - if b.Available() == 0 && len(p) >= len(b.buf) { + if b.Buffered() == 0 && len(p) >= len(b.buf) { // Large write, empty buffer. // Write directly from p to avoid copy. n, b.err = b.wr.Write(p)