• Brad Fitzpatrick's avatar
    net/http: fix location of StateHijacked and StateActive · 709b12ff
    Brad Fitzpatrick authored
    1) Move StateHijacked callback earlier, to make it
    panic-proof.  A Hijack followed by a panic didn't previously
    result in ConnState getting fired for StateHijacked.  Move it
    earlier, to the time of hijack.
    
    2) Don't fire StateActive unless any bytes were read off the
    wire while waiting for a request. This means we don't
    transition from New or Idle to Active if the client
    disconnects or times out. This was documented before, but not
    implemented properly.
    
    This CL is required for an pending fix for Issue 7264
    
    LGTM=josharian
    R=josharian
    CC=golang-codereviews
    https://golang.org/cl/69860049
    709b12ff
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...