]> Cypherpunks repositories - gostls13.git/commitdiff
internal/trace: increment sync counter before final Sync on error
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 10 Feb 2025 23:54:56 +0000 (23:54 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 11 Feb 2025 16:21:30 +0000 (08:21 -0800)
CL 648195 was supposed to have fixed #71615, but it didn't include an
update to r.syncs. I can confirm this CL fixes the issue even when
running the test many times in a row.

Fixes #71615.

Change-Id: I97db3d639dc5bc8648a191696f90b0e5087307c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/648315
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Bypass: Michael Knyszek <mknyszek@google.com>

src/internal/trace/reader.go

index 75b88f7bac5fbc4c89430f4ac3bb6d0ad8d0b851..f5f871763fd9cf444fb9888150df5afed8c27fce 100644 (file)
@@ -154,6 +154,7 @@ func (r *Reader) ReadEvent() (e Event, err error) {
                // Read the next generation.
                r.gen, r.spill, r.spillErr = readGeneration(r.r, r.spill)
                if r.gen == nil {
+                       r.syncs++
                        return syncEvent(nil, r.lastTs, r.syncs), nil
                }