Re-estimate latmin when rate is low
Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
2
mud.c
2
mud.c
@@ -1405,6 +1405,8 @@ mud_recv(struct mud *mud, void *data, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path->recv.ratemax > rate) {
|
if (path->recv.ratemax > rate) {
|
||||||
|
if (rate < (7 * path->recv.ratemax) / 8)
|
||||||
|
path->latmin = (7 * path->latmin + path->lat) / 8;
|
||||||
if (path->latmin < path->lat) {
|
if (path->latmin < path->lat) {
|
||||||
const uint64_t a = path->lat - path->latmin;
|
const uint64_t a = path->lat - path->latmin;
|
||||||
const uint64_t b = path->latmax - path->lat;
|
const uint64_t b = path->latmax - path->lat;
|
||||||
|
|||||||
Reference in New Issue
Block a user