Commit b7b192df authored by Stefan Eissing's avatar Stefan Eissing
Browse files

On the trunk:

mod_http2: session pool cleanup at pre_close.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1786575 13f79535-47bb-0310-9956-ffa450edef68
parent a0f51852
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -712,6 +712,7 @@ static apr_status_t session_cleanup(h2_session *session, const char *trigger)
    session->ngh2 = NULL;
    h2_ctx_clear(c);
    
    
    return APR_SUCCESS;
}

@@ -2229,9 +2230,19 @@ out:

apr_status_t h2_session_pre_close(h2_session *session, int async)
{
    apr_status_t status;
    
    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c, 
                  H2_SSSN_MSG(session, "pre_close"));
    dispatch_event(session, H2_SESSION_EV_PRE_CLOSE, 0, 
        (session->state == H2_SESSION_ST_IDLE)? "timeout" : NULL);
    return session_cleanup(session, "pre_close");
    status = session_cleanup(session, "pre_close");
    if (status == APR_SUCCESS) {
        /* no one should hold a reference to this session any longer and
         * the h2_ctx was removed from the connection.
         * Take the pool (and thus all subpools etc. down now, instead of
         * during cleanup of main connection pool. */
        apr_pool_destroy(session->pool);
    }
    return status;
}