Commit fa16e66a authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Fix max distance in weight group/address cycle comparison

parent 40af31da
......@@ -153,7 +153,7 @@ struct DownstreamAddrEntryGreater {
if (d == 0) {
return rhs.seq < lhs.seq;
}
return d <= MAX_DOWNSTREAM_ADDR_WEIGHT;
return d <= 2 * MAX_DOWNSTREAM_ADDR_WEIGHT - 1;
}
};
......@@ -182,7 +182,7 @@ struct WeightGroupEntryGreater {
if (d == 0) {
return rhs.seq < lhs.seq;
}
return d <= MAX_DOWNSTREAM_ADDR_WEIGHT;
return d <= 2 * MAX_DOWNSTREAM_ADDR_WEIGHT - 1;
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment