httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1587057 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_wstunnel.c
Date Sun, 13 Apr 2014 17:26:30 GMT
Author: covener
Date: Sun Apr 13 17:26:30 2014
New Revision: 1587057

URL: http://svn.apache.org/r1587057
Log:
stop leaking websockets backend connections (trunk only)

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1587057&r1=1587056&r2=1587057&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Apr 13 17:26:30 2014
@@ -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] 

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c?rev=1587057&r1=1587056&r2=1587057&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_wstunnel.c Sun Apr 13 17:26:30 2014
@@ -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
     }
     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
                                 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
     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(reques
 
         /* Step Three: Process the Request */
         status = ap_proxy_wstunnel_request(p, r, backend, worker, conf, uri, locurl,
-                                      server_portstr);
+                                      server_portstr, scheme);
         break;
     }
 



Mime
View raw message