Repository: trafficserver Updated Branches: refs/heads/master 06fbcac1e -> 325422f77
TS-4259: Only null out ua_session if it was in the tunnel when the tunnel collapsed. This closes #514. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/325422f7 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/325422f7 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/325422f7 Branch: refs/heads/master Commit: 325422f771949ef7fb3a0cc715b93f7812eddba4 Parents: 06fbcac Author: Alan M. Carroll <[email protected]> Authored: Sat Mar 5 21:54:38 2016 -0600 Committer: Alan M. Carroll <[email protected]> Committed: Tue Mar 8 11:53:23 2016 -0600 ---------------------------------------------------------------------- proxy/http/HttpSM.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/325422f7/proxy/http/HttpSM.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 4b18dbc..aafa718 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -2897,7 +2897,13 @@ HttpSM::tunnel_handler_server(int event, HttpTunnelProducer *p) if (is_http_server_eos_truncation(p)) { DebugSM("http", "[%" PRId64 "] [HttpSM::tunnel_handler_server] aborting HTTP tunnel due to server truncation", sm_id); tunnel.chain_abort_all(p); - ua_session = NULL; + // UA session may not be in the tunnel yet, don't NULL out the pointer in that case. + // Note: This is a hack. The correct solution is for the UA session to signal back to the SM + // when the UA is about to be destroyed and clean up the pointer there. That should be done once + // the TS-3612 changes are in place (and similarly for the server session). + if (ua_entry->in_tunnel) + ua_session = NULL; + t_state.current.server->abort = HttpTransact::ABORTED; t_state.client_info.keep_alive = HTTP_NO_KEEPALIVE; t_state.current.server->keep_alive = HTTP_NO_KEEPALIVE;
