Fix bandwidth reporting when doing a restarted download with "-r".
The offset is already accounted for in xs->lastrcvd and doesn't have to be subtracted again. Reported by: Florian Smeets <flo@smeets.im> Submitted by: Mateusz Guzik <mjguzik@gmail.com> Tested by: Florian Smeets <flo@smeets.im> MFC after: 1 week
This commit is contained in:
parent
39d4f2c6f0
commit
162361c198
@ -183,7 +183,7 @@ stat_bps(struct xferstat *xs)
|
||||
if (delta == 0.0) {
|
||||
snprintf(str, sizeof str, "?? Bps");
|
||||
} else {
|
||||
bps = (xs->rcvd - xs->lastrcvd - xs->offset) / delta;
|
||||
bps = (xs->rcvd - xs->lastrcvd) / delta;
|
||||
snprintf(str, sizeof str, "%sps", stat_bytes((off_t)bps));
|
||||
}
|
||||
return (str);
|
||||
|
Loading…
Reference in New Issue
Block a user