| 2111 | } |
| 2112 | |
| 2113 | apr_status_t h2_session_pre_close(h2_session *session, int async) |
| 2114 | { |
| 2115 | apr_status_t status; |
| 2116 | |
| 2117 | ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c1, |
| 2118 | H2_SSSN_MSG(session, "pre_close")); |
| 2119 | h2_session_dispatch_event(session, H2_SESSION_EV_PRE_CLOSE, 0, |
| 2120 | (session->state == H2_SESSION_ST_IDLE)? "timeout" : NULL); |
| 2121 | status = session_cleanup(session, "pre_close"); |
| 2122 | if (status == APR_SUCCESS) { |
| 2123 | /* no one should hold a reference to this session any longer and |
| 2124 | * the h2_conn_ctx_twas removed from the connection. |
| 2125 | * Take the pool (and thus all subpools etc. down now, instead of |
| 2126 | * during cleanup of main connection pool. */ |
| 2127 | apr_pool_destroy(session->pool); |
| 2128 | } |
| 2129 | return status; |
| 2130 | } |
no test coverage detected