Description
If you have ATS configured with keep_alive out disabled, and an origin that responds with transfer-encoding chunked ATS puts the connection on the keepalive pool after the transfer is finished. Since keep_alive_out is disabled the request contains a connection close header. This means that we now have a race condition between the origin actually closing the tcp session (assuming its well behaved) and ATS re-using that keep-alive session (which it shouldn't have kept).
This means not only are we disobeying the configuration (which specified no keep-alive) but we are "breaking" connections-- as they will 502 (since the tunnel will be shutdown).