serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1711932 - /serf/trunk/protocols/http2_protocol.c
Date Mon, 02 Nov 2015 10:22:54 GMT
Author: rhuijben
Date: Mon Nov  2 10:22:54 2015
New Revision: 1711932

URL: http://svn.apache.org/viewvc?rev=1711932&view=rev
Log:
* protocols/http2_protocol.c
  (serf_http2__stream_get): Minor correctness fix. Explicitly
    created streams (via priority, etc.) are not closed only
    those that 'might have been initiated'.

Modified:
    serf/trunk/protocols/http2_protocol.c

Modified: serf/trunk/protocols/http2_protocol.c
URL: http://svn.apache.org/viewvc/serf/trunk/protocols/http2_protocol.c?rev=1711932&r1=1711931&r2=1711932&view=diff
==============================================================================
--- serf/trunk/protocols/http2_protocol.c (original)
+++ serf/trunk/protocols/http2_protocol.c Mon Nov  2 10:22:54 2015
@@ -1458,24 +1458,16 @@ serf_http2__stream_get(serf_http2_protoc
         h2->last = h2->first = stream;
 
       if (streamid < h2->rl_next_streamid)
-        stream->status = H2S_CLOSED;
-      else
-        h2->rl_next_streamid = (streamid + 2);
-
-      for (rs = h2->first; rs; rs = rs->next)
         {
-          if (rs->status <= H2S_IDLE
-              && rs->streamid < streamid
-              && (streamid & 0x01) == (rs->streamid & 0x01))
-            {
-              /* https://tools.ietf.org/html/rfc7540#section-5.1.1
-                 The first use of a new stream identifier implicitly closes
-                 all streams in the "idle" state that might have been
-                 initiated by that peer with a lower-valued stream identifier.
-              */
-              rs->status = H2S_CLOSED;
-            }
+          /* https://tools.ietf.org/html/rfc7540#section-5.1.1
+             The first use of a new stream identifier implicitly closes
+             all streams in the "idle" state that might have been
+             initiated by that peer with a lower-valued stream identifier.
+          */
+          stream->status = H2S_CLOSED;
         }
+      else
+        h2->rl_next_streamid = (streamid + 2);
 
       return stream;
     }



Mime
View raw message