mirror of
https://github.com/golang/go.git
synced 2026-02-04 09:55:06 +03: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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user