mirror of
https://github.com/golang/go.git
synced 2026-02-06 18:00:01 +00:00
internal/trace: fix recorder.Write return value for header-only buffers
Fix issue #77083
Change-Id: I9189d1e3a6efea8478224164e820f50c818abcd5
GitHub-Last-Rev: bb24cbda95
GitHub-Pull-Request: golang/go#77092
Reviewed-on: https://go-review.googlesource.com/c/go/+/734300
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Commit-Queue: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
f6ebd91129
commit
d1e7f49e3d
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ func (w *recorder) Write(b []byte) (n int, err error) {
|
|||
w.headerReceived = true
|
||||
}
|
||||
if len(b) == n {
|
||||
return 0, nil
|
||||
return n, nil
|
||||
}
|
||||
ba, nb, err := readBatch(b[n:]) // Every write from the runtime is guaranteed to be a complete batch.
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue