]> git.kaiwu.me - nginx.git/commitdiff
SPDY: fixed reversed priority order in window waiting queue.
authorValentin Bartenev <vbart@nginx.com>
Wed, 12 Feb 2014 17:02:29 +0000 (21:02 +0400)
committerValentin Bartenev <vbart@nginx.com>
Wed, 12 Feb 2014 17:02:29 +0000 (21:02 +0400)
src/http/ngx_http_spdy.h
src/http/ngx_http_spdy_filter_module.c

index b98b4d85a84235b55bc3ce265533ae3b98912f48..55aceda89996ebf9a86f549bce4c1c75ecffdb2d 100644 (file)
@@ -174,6 +174,9 @@ ngx_http_spdy_queue_frame(ngx_http_spdy_connection_t *sc,
 
     for (out = &sc->last_out; *out; out = &(*out)->next)
     {
+        /*
+         * NB: higher values represent lower priorities.
+         */
         if (frame->priority >= (*out)->priority) {
             break;
         }
index 8a3f0a3c89ba206e588adee8438445f03f253373..92c760243708215dedddf9ac0a736aebd11f0c85 100644 (file)
@@ -967,7 +967,10 @@ ngx_http_spdy_waiting_queue(ngx_http_spdy_connection_t *sc,
     {
         s = ngx_queue_data(q, ngx_http_spdy_stream_t, queue);
 
-        if (s->priority >= stream->priority) {
+        /*
+         * NB: higher values represent lower priorities.
+         */
+        if (stream->priority >= s->priority) {
             break;
         }
     }