]> git.kaiwu.me - nginx.git/commitdiff
SPDY: ignore priority when queuing blocked frames.
authorValentin Bartenev <vbart@nginx.com>
Mon, 30 Sep 2013 20:14:37 +0000 (00:14 +0400)
committerValentin Bartenev <vbart@nginx.com>
Mon, 30 Sep 2013 20:14:37 +0000 (00:14 +0400)
With this change all such frames will be added in front of the output queue, and
will be sent first.  It prevents HOL blocking when response with higher priority
is blocked by response with lower priority in the middle of the queue because
the order of their SYN_REPLY frames cannot be changed.

Proposed by Yury Kirpichev.

src/http/ngx_http_spdy.h

index 63014066d12417ee13c0453efd34f292b334ba07..c47243fb0134415030fccf0293f2b9f42f20aa1e 100644 (file)
@@ -173,9 +173,9 @@ ngx_http_spdy_queue_blocked_frame(ngx_http_spdy_connection_t *sc,
 {
     ngx_http_spdy_out_frame_t  **out;
 
-    for (out = &sc->last_out; *out && !(*out)->blocked; out = &(*out)->next)
+    for (out = &sc->last_out; *out; out = &(*out)->next)
     {
-        if (frame->priority >= (*out)->priority) {
+        if ((*out)->blocked) {
             break;
         }
     }