| 89 | } |
| 90 | |
| 91 | int |
| 92 | HttpSessionAccept::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 | } |
nothing calls this directly
no test coverage detected