fs: Async buffer: use ReadFill to fill the chunks and increase to 1MB

This commit is contained in:
Nick Craig-Wood
2017-02-14 22:33:53 +00:00
parent 493da54113
commit 7fa687b3e1
3 changed files with 3 additions and 3 deletions

View File

@ -183,7 +183,7 @@ func (b *buffer) isEmpty() bool {
// Any error encountered during the read is returned.
func (b *buffer) read(rd io.Reader) error {
var n int
n, b.err = rd.Read(b.buf[0:b.size])
n, b.err = ReadFill(rd, b.buf[0:b.size])
b.buf = b.buf[0:n]
b.offset = 0
return b.err