MCPcopy Create free account
hub / github.com/apache/trafficserver / mainEvent

Method mainEvent

src/proxy/http/HttpSessionAccept.cc:91–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91int
92HttpSessionAccept::mainEvent(int event, void *data)
93{
94 NetVConnection *netvc;
95 ink_release_assert(event == NET_EVENT_ACCEPT || event == EVENT_ERROR);
96 ink_release_assert((event == NET_EVENT_ACCEPT) ? (data != nullptr) : (1));
97
98 if (event == NET_EVENT_ACCEPT) {
99 netvc = static_cast<NetVConnection *>(data);
100 if (!this->accept(netvc, nullptr, nullptr)) {
101 netvc->do_io_close();
102 }
103 return EVENT_CONT;
104 }
105
106 /////////////////
107 // EVENT_ERROR //
108 /////////////////
109 if (((long)data) == -ECONNABORTED) {
110 // FIX: add time to user_agent_hangup
111 Metrics::Counter::increment(http_rsb.ua_counts_errors_pre_accept_hangups);
112 // Metrics::Counter::increment(http_rsb.ua_msecs_errors_pre_accept_hangups, 0); // ToDo: Weird, but we added 0 here before
113 }
114
115 ink_abort("HTTP accept received fatal error: errno = %d", -(static_cast<int>((intptr_t)data)));
116 return EVENT_CONT;
117}

Callers

nothing calls this directly

Calls 4

acceptMethod · 0.95
incrementFunction · 0.85
ink_abortFunction · 0.50
do_io_closeMethod · 0.45

Tested by

no test coverage detected