MCPcopy Create free account
hub / github.com/apache/httpd / session_pool_cleanup

Function session_pool_cleanup

modules/http2/h2_session.c:885–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883}
884
885static apr_status_t session_pool_cleanup(void *data)
886{
887 conn_rec *c = data;
888 h2_conn_ctx_t *conn_ctx = h2_conn_ctx_get(c);
889 h2_session *session = conn_ctx? conn_ctx->session : NULL;
890
891 if (session) {
892 int mpm_state = 0;
893 int level;
894
895 ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state);
896 level = (AP_MPMQ_STOPPING == mpm_state)? APLOG_DEBUG : APLOG_WARNING;
897 /* if the session is still there, now is the last chance
898 * to perform cleanup. Normally, cleanup should have happened
899 * earlier in the connection pre_close.
900 * However, when the server is stopping, it may shutdown connections
901 * without running the pre_close hooks. Do not want about that. */
902 ap_log_cerror(APLOG_MARK, level, 0, c,
903 H2_SSSN_LOG(APLOGNO(10020), session,
904 "session cleanup triggered by pool cleanup. "
905 "this should have happened earlier already."));
906 return session_cleanup(session, "pool cleanup");
907 }
908 return APR_SUCCESS;
909}
910
911static /* atomic */ apr_uint32_t next_id;
912

Callers

nothing calls this directly

Calls 2

ap_mpm_queryFunction · 0.85
session_cleanupFunction · 0.85

Tested by

no test coverage detected