Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions proxy/http/HttpSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2792,6 +2792,8 @@ HttpSM::tunnel_handler_post(int event, void *data)
handle_post_failure();
break;
case HTTP_SM_POST_UA_FAIL:
// Client side failed. Shutdown and go home. No need to communicate back to UA
terminate_sm = true;
break;
case HTTP_SM_POST_SUCCESS:
// It's time to start reading the response
Expand Down Expand Up @@ -3532,9 +3534,7 @@ HttpSM::tunnel_handler_post_ua(int event, HttpTunnelProducer *p)
hsm_release_assert(ua_entry->in_tunnel == true);
if (p->consumer_list.head && p->consumer_list.head->vc_type == HT_TRANSFORM) {
hsm_release_assert(post_transform_info.entry->in_tunnel == true);
} else if (server_entry != nullptr) {
hsm_release_assert(server_entry->in_tunnel == true);
}
} // server side may have completed before the user agent side, so it may no longer be in tunnel
break;

case VC_EVENT_READ_COMPLETE:
Expand Down Expand Up @@ -3669,7 +3669,8 @@ HttpSM::tunnel_handler_post_server(int event, HttpTunnelConsumer *c)

case VC_EVENT_WRITE_COMPLETE:
// Completed successfully
c->write_success = true;
c->write_success = true;
server_entry->in_tunnel = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this single line change will fix the crash. However, calling release_server_session() before setting server_session = nullptr make sense.

break;
default:
ink_release_assert(0);
Expand Down