internal/poll: clear completed Buffers to permit earlier collection

Updates #45163

Change-Id: I73a6f22715550e0e8b83fbd3ebec72ef019f153f
Reviewed-on: https://go-review.googlesource.com/c/go/+/373374
Run-TryBot: Lee Baokun <bk@golangcn.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Baokun Lee 2021-12-20 14:02:00 +08:00 committed by Gopher Robot
parent 2719b1a9a8
commit 32acceb359
1 changed files with 1 additions and 0 deletions

View File

@ -74,6 +74,7 @@ func consume(v *[][]byte, n int64) {
return
}
n -= ln0
(*v)[0] = nil
*v = (*v)[1:]
}
}