Skip to content

Commit

Permalink
perf: fully utilize buffer pool
Browse files Browse the repository at this point in the history
Mistakenly didn't put a used buffer back.
  • Loading branch information
JensRantil committed Jan 8, 2019
1 parent 97cc402 commit e330992
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fss.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func write(in <-chan *bytes.Buffer, pool *BufferPool) {
if _, err := io.Copy(out, e); err != nil {
log.Fatalln("could not write to stdout:", err)
}
pool.Put(e)
out.WriteRune('\n')
}
out.Flush()
Expand Down

0 comments on commit e330992

Please sign in to comment.