Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion proxy/http/HttpSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,7 @@ HttpSM::state_raw_http_server_open(int event, void *data)
server_entry->vc = netvc = (NetVConnection *)data;
server_entry->vc_type = HTTP_RAW_SERVER_VC;
t_state.current.state = HttpTransact::CONNECTION_ALIVE;
ats_ip_copy(&t_state.server_info.src_addr, netvc->get_local_addr());

netvc->set_inactivity_timeout(HRTIME_SECONDS(t_state.txn_conf->transaction_no_activity_timeout_out));
netvc->set_active_timeout(HRTIME_SECONDS(t_state.txn_conf->transaction_active_timeout_out));
Expand Down Expand Up @@ -1716,6 +1717,7 @@ HttpSM::state_http_server_open(int event, void *data)
pending_action = nullptr;
milestones[TS_MILESTONE_SERVER_CONNECT_END] = Thread::get_hrtime();
HttpServerSession *session;
NetVConnection *netvc = nullptr;

switch (event) {
case NET_EVENT_OPEN:
Expand All @@ -1725,9 +1727,11 @@ HttpSM::state_http_server_open(int event, void *data)
session->sharing_pool = static_cast<TSServerSessionSharingPoolType>(t_state.http_config_param->server_session_sharing_pool);
session->sharing_match = static_cast<TSServerSessionSharingMatchType>(t_state.txn_conf->server_session_sharing_match);

netvc = static_cast<NetVConnection *>(data);
session->attach_hostname(t_state.current.server->name);
session->new_connection(static_cast<NetVConnection *>(data));
session->new_connection(netvc);
session->state = HSS_ACTIVE;
ats_ip_copy(&t_state.server_info.src_addr, netvc->get_local_addr());

// If origin_max_connections or origin_min_keep_alive_connections is set then we are metering
// the max and or min number of connections per host. Transfer responsibility for this to the
Expand Down
5 changes: 3 additions & 2 deletions proxy/http/HttpTransact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3608,9 +3608,10 @@ HttpTransact::retry_server_connection_not_open(State *s, ServerState_t conn_stat
// record the failue //
//////////////////////////////////////////
if (0 == s->current.attempts) {
Log::error("CONNECT:[%d] could not connect [%s] to %s for '%s'", s->current.attempts,
Log::error("CONNECT:[%d] could not connect [%s] to %s for '%s' connect_result=%d src_port=%d", s->current.attempts,
HttpDebugNames::get_server_state_name(conn_state),
ats_ip_ntop(&s->current.server->dst_addr.sa, addrbuf, sizeof(addrbuf)), url_string ? url_string : "<none>");
ats_ip_ntop(&s->current.server->dst_addr.sa, addrbuf, sizeof(addrbuf)), url_string ? url_string : "<none>",
s->current.server->connect_result, ntohs(s->current.server->src_addr.port()));
}

if (url_string) {
Expand Down