]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
stop leaking websockets backend connections (trunk only)
authorEric Covener <covener@apache.org = covener = Eric Covener covener@apache.org@apache.org>
Sun, 13 Apr 2014 17:26:30 +0000 (17:26 +0000)
committerEric Covener <covener@apache.org = covener = Eric Covener covener@apache.org@apache.org>
Sun, 13 Apr 2014 17:26:30 +0000 (17:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1587057 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_wstunnel.c

diff --git a/CHANGES b/CHANGES
index a3fb8c64a5bf652b1251aa25921aa80a234578a3..75c14ce94e4fdf06f69f7ed9f08e7414370adb7c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_proxy_wstunnel: Stop leaking websockets backend connections under
+     event MPMi (trunk-only). [Eric Covener]
+
   *) mod_proxy_wstunnel: Don't issue AH02447 and log a 500 on routine 
      hangups from websockets origin servers. PR 56299
      [Yann Ylavic, Edward Lu <Chaosed0 gmail com>, Eric Covener] 
index 8dcd4e7253190b04d5556705acfedb0b43234bcf..d5e42b97fdcb09c978bc36aa94dda2676eecd78b 100644 (file)
@@ -28,6 +28,7 @@ typedef struct ws_baton_t {
     apr_bucket_brigade *bb;
     int is_client;
     apr_pool_t *subpool;
+    char *scheme;
 } ws_baton_t;
 
 static int proxy_wstunnel_transfer(request_rec *r, conn_rec *c_i, conn_rec *c_o,
@@ -138,6 +139,7 @@ static void proxy_wstunnel_callback(void *b) {
     }
     else {
         ap_mpm_unregister_socket_callback(sockets, baton->subpool);
+        ap_proxy_release_connection(baton->scheme, baton->proxy_connrec, baton->r->server);
         apr_thread_mutex_unlock(baton->r->invoke_mtx);
         ap_finalize_request_protocol(baton->r);
         ap_process_request_after_handler(baton->r);
@@ -297,7 +299,7 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
                                 proxy_worker *worker,
                                 proxy_server_conf *conf,
                                 apr_uri_t *uri,
-                                char *url, char *server_portstr)
+                                char *url, char *server_portstr, char *scheme)
 {
     apr_status_t rv = APR_SUCCESS;
     apr_pollset_t *pollset;
@@ -379,6 +381,7 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
     baton->server_soc = sock;
     baton->proxy_connrec = conn;
     baton->bb = bb;
+    baton->scheme = scheme;
     apr_pool_create(&baton->subpool, r->pool);
 
     status = proxy_wstunnel_pump(baton, apr_time_from_sec(5)); 
@@ -476,7 +479,7 @@ static int proxy_wstunnel_handler(request_rec *r, proxy_worker *worker,
 
         /* Step Three: Process the Request */
         status = ap_proxy_wstunnel_request(p, r, backend, worker, conf, uri, locurl,
-                                      server_portstr);
+                                      server_portstr, scheme);
         break;
     }