Ensure that pri goes to the lowest value
This commit is contained in:
parent
ffed4f0031
commit
d773b42a2d
|
@ -1398,11 +1398,15 @@ nghttp2_outbound_item* nghttp2_session_pop_next_ob_item
|
||||||
*/
|
*/
|
||||||
static void adjust_pri(nghttp2_outbound_item *item)
|
static void adjust_pri(nghttp2_outbound_item *item)
|
||||||
{
|
{
|
||||||
if(item->pri >= (int32_t)(NGHTTP2_PRI_LOWEST - (item->pri_decay - 1))) {
|
if(item->pri == NGHTTP2_PRI_LOWEST) {
|
||||||
item->pri = item->inipri;
|
item->pri = item->inipri;
|
||||||
item->pri_decay = 1;
|
item->pri_decay = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(item->pri > (int32_t)(NGHTTP2_PRI_LOWEST - (item->pri_decay - 1))) {
|
||||||
|
item->pri = NGHTTP2_PRI_LOWEST;
|
||||||
|
return;
|
||||||
|
}
|
||||||
item->pri += (int32_t)(item->pri_decay - 1);
|
item->pri += (int32_t)(item->pri_decay - 1);
|
||||||
item->pri_decay <<= 1;
|
item->pri_decay <<= 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue