Author: rhuijben
Date: Mon Nov  9 19:01:08 2015
New Revision: 1713511

URL: http://svn.apache.org/viewvc?rev=1713511&view=rev
Log:
Following up on r1713500, don't make the number of requests and responses
go out of sync, but fix the calculation in outgoing.c instead.

* outgoing.c
  (read_from_connection): Let go the moment we don't receive a close on the
    guessed maximum instead of one later.

* ssltunnel.c
  (handle_response): Remove tweak here.

Modified:
    serf/trunk/outgoing.c
    serf/trunk/ssltunnel.c

Modified: serf/trunk/outgoing.c
URL: 
http://svn.apache.org/viewvc/serf/trunk/outgoing.c?rev=1713511&r1=1713510&r2=1713511&view=diff
==============================================================================
--- serf/trunk/outgoing.c (original)
+++ serf/trunk/outgoing.c Mon Nov  9 19:01:08 2015
@@ -1298,7 +1298,7 @@ static apr_status_t read_from_connection
          * Let our requests go.
          */
         if (conn->probable_keepalive_limit &&
-            conn->completed_responses > conn->probable_keepalive_limit) {
+            conn->completed_responses >= conn->probable_keepalive_limit) {
             conn->probable_keepalive_limit = 0;
         }
 

Modified: serf/trunk/ssltunnel.c
URL: 
http://svn.apache.org/viewvc/serf/trunk/ssltunnel.c?rev=1713511&r1=1713510&r2=1713511&view=diff
==============================================================================
--- serf/trunk/ssltunnel.c (original)
+++ serf/trunk/ssltunnel.c Mon Nov  9 19:01:08 2015
@@ -132,10 +132,6 @@ static apr_status_t handle_response(serf
             serf__bucket_headers_remove(hdrs, "Connection");
         }
 
-        /* Avoid problems caused by max-keepalive guessing */
-        conn->completed_requests = 0;
-        /* ### Reset max-keepalive? */
-
         return APR_EOF;
     }
 


Reply via email to