| 3819 | } |
| 3820 | |
| 3821 | void |
| 3822 | HttpTransact::error_log_connection_failure(State *s, ServerState_t conn_state) |
| 3823 | { |
| 3824 | ip_port_text_buffer addrbuf; |
| 3825 | TxnDbg(dbg_ctl_http_trans, "[%d] failed to connect [%d] to %s", s->current.retry_attempts.get(), conn_state, |
| 3826 | ats_ip_nptop(&s->current.server->dst_addr.sa, addrbuf, sizeof(addrbuf))); |
| 3827 | |
| 3828 | if (s->current.server->had_connect_fail()) { |
| 3829 | char *url_str = s->hdr_info.client_request.url_string_get(&s->arena); |
| 3830 | int host_len = 0; |
| 3831 | const char *host_name_ptr = ""; |
| 3832 | if (s->unmapped_url.valid()) { |
| 3833 | host_name_ptr = s->unmapped_url.host_get(&host_len); |
| 3834 | } |
| 3835 | std::string_view host_name{host_name_ptr, size_t(host_len)}; |
| 3836 | swoc::bwprint(error_bw_buffer, |
| 3837 | "CONNECT: attempt fail [{}] to {} for host='{}' " |
| 3838 | "connection_result={::s} error={::s} retry_attempts={} url='{}'", |
| 3839 | HttpDebugNames::get_server_state_name(conn_state), s->current.server->dst_addr, host_name, |
| 3840 | swoc::bwf::Errno(s->current.server->connect_result), swoc::bwf::Errno(s->cause_of_death_errno), |
| 3841 | s->current.retry_attempts.get(), swoc::bwf::FirstOf(url_str, "<none>")); |
| 3842 | Log::error("%s", error_bw_buffer.c_str()); |
| 3843 | |
| 3844 | s->arena.str_free(url_str); |
| 3845 | } |
| 3846 | } |
| 3847 | |
| 3848 | /////////////////////////////////////////////////////////////////////////////// |
| 3849 | // Name : retry_server_connection_not_open |
nothing calls this directly
no test coverage detected