Skip to content

Commit d1e7f49

Browse files
jjpintoGo LUCI
authored andcommitted
internal/trace: fix recorder.Write return value for header-only buffers
Fix issue #77083 Change-Id: I9189d1e3a6efea8478224164e820f50c818abcd5 GitHub-Last-Rev: bb24cbd GitHub-Pull-Request: #77092 Reviewed-on: https://go-review.googlesource.com/c/go/+/734300 Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Commit-Queue: Michael Knyszek <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent f6ebd91 commit d1e7f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/trace/recorder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (w *recorder) Write(b []byte) (n int, err error) {
3939
w.headerReceived = true
4040
}
4141
if len(b) == n {
42-
return 0, nil
42+
return n, nil
4343
}
4444
ba, nb, err := readBatch(b[n:]) // Every write from the runtime is guaranteed to be a complete batch.
4545
if err != nil {

0 commit comments

Comments
 (0)