• Tom Bergan's avatar
    http2: fix flake in TestServer_Push_StateTransitions · 4aaac4bb
    Tom Bergan authored
    I believe there were two bugs, both fixed by this CL.
    
    * Previously, we checked stateHalfClosedRemote before waiting for the
      PUSH_PROMISE. However, the pushed stream is not created until the promise
      is written, so the stream may not have started yet, which means we'd see
      stateIdle instead of stateHalfClosedRemote.
    
    * The push reponse handler cannot write the response until after we
      check the pushed stream state. Otherwise, the response might finish
      just before we check the stream state and we'll see stateClosed instead
      of stateHalfClosedRemote.
    
    Test passes with -count 1000.
    
    Fixes golang/go#18559
    
    Change-Id: I61f62635957e061fba905a41dcb15cd4e563031a
    Reviewed-on: https://go-review.googlesource.com/34984
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Run-TryBot: Tom Bergan <tombergan@google.com>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    4aaac4bb
Name
Last commit
Last update
bpf Loading commit data...
context Loading commit data...
dict Loading commit data...
html Loading commit data...
http2 Loading commit data...
icmp Loading commit data...
idna Loading commit data...
internal Loading commit data...
ipv4 Loading commit data...
ipv6 Loading commit data...
lex/httplex Loading commit data...
lif Loading commit data...
nettest Loading commit data...
netutil Loading commit data...
proxy Loading commit data...
publicsuffix Loading commit data...
route Loading commit data...
trace Loading commit data...
webdav Loading commit data...
websocket Loading commit data...
xsrftoken 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 Loading commit data...
codereview.cfg Loading commit data...