• Brad Fitzpatrick's avatar
    net/http: fix ordering & data race in TestTransportEventTrace_h2 · f42f20ad
    Brad Fitzpatrick authored
    Ordering fix: this CL swaps the order of the log write and the channel close
    in WroteRequest. I could reproduce the bug by putting a sleep between the two
    when the channel close was first. It needs to happen after the log.
    
    Data race: use the log buffer's mutex when reading too. Not really
    important once the ordering fix above is fixed (since nobody is
    concurrently writing anymore), but for consistency.
    
    Fixes #16414
    
    Change-Id: If6657884e67be90b4455c8f5a6f7bc6981999ee4
    Reviewed-on: https://go-review.googlesource.com/28078
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    f42f20ad
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...