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

Method mainEvent

src/traffic_server/traffic_server.cc:266–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264
265struct AutoStopCont : public Continuation {
266 int
267 mainEvent(int /* event */, Event * /* e */)
268 {
269 TSSystemState::stop_ssl_handshaking();
270
271 APIHook *hook = g_lifecycle_hooks->get(TS_LIFECYCLE_SHUTDOWN_HOOK);
272 while (hook) {
273 WEAK_SCOPED_MUTEX_LOCK(lock, hook->m_cont->mutex, this_ethread());
274 hook->invoke(TS_EVENT_LIFECYCLE_SHUTDOWN, nullptr);
275 hook = hook->next();
276 }
277
278 // if the jsonrpc feature was disabled, the object will not be created.
279 if (jsonrpcServer != nullptr) {
280 jsonrpcServer->stop_thread();
281 }
282
283 TSSystemState::shut_down_event_system();
284 delete this;
285 return EVENT_CONT;
286 }
287
288 AutoStopCont() : Continuation(new_ProxyMutex()) { SET_HANDLER(&AutoStopCont::mainEvent); }
289};

Callers

nothing calls this directly

Calls 5

this_ethreadFunction · 0.85
stop_threadMethod · 0.80
getMethod · 0.45
invokeMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected