| 264 | |
| 265 | struct 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 | }; |
nothing calls this directly
no test coverage detected