httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1786575 - /httpd/httpd/trunk/modules/http2/h2_session.c
Date Sun, 12 Mar 2017 14:02:33 GMT
Author: icing
Date: Sun Mar 12 14:02:33 2017
New Revision: 1786575

URL: http://svn.apache.org/viewvc?rev=1786575&view=rev
Log:
On the trunk:

mod_http2: session pool cleanup at pre_close.


Modified:
    httpd/httpd/trunk/modules/http2/h2_session.c

Modified: httpd/httpd/trunk/modules/http2/h2_session.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_session.c?rev=1786575&r1=1786574&r2=1786575&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_session.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_session.c Sun Mar 12 14:02:33 2017
@@ -712,6 +712,7 @@ static apr_status_t session_cleanup(h2_s
     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;
 }



Mime
View raw message