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

Method mainEvent

src/proxy/http2/Http2SessionAccept.cc:85–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85int
86Http2SessionAccept::mainEvent(int event, void *data)
87{
88 ink_release_assert(event == NET_EVENT_ACCEPT || event == EVENT_ERROR);
89 ink_release_assert((event == NET_EVENT_ACCEPT) ? (data != nullptr) : (1));
90
91 if (event == NET_EVENT_ACCEPT) {
92 NetVConnection *netvc = static_cast<NetVConnection *>(data);
93 if (!this->accept(netvc, nullptr, nullptr)) {
94 netvc->do_io_close();
95 }
96 return EVENT_CONT;
97 }
98
99 // XXX We should hoist the error handling so that all the protocols generate the statistics
100 // without code duplication.
101 if (((long)data) == -ECONNABORTED) {
102 Metrics::Counter::increment(http_rsb.ua_counts_errors_pre_accept_hangups);
103 // Metrics::Counter::increment(http_rsb.ua_msecs_errors_pre_accept_hangups, 0); // ToDo: This is odd, but we added 0 before as
104 // well
105 }
106
107 ink_abort("HTTP/2 accept received fatal error: errno = %d", -(static_cast<int>((intptr_t)data)));
108 return EVENT_CONT;
109}

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