| 83 | } |
| 84 | |
| 85 | int |
| 86 | Http2SessionAccept::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 | } |
nothing calls this directly
no test coverage detected