MINOR: bwlim: Remove useless test on CF_READ_ERROR to detect the last packet

There is already a test on CF_EOI and CF_SHUTR. The last one is always set
when a read error is reported. Thus there is no reason to check
CF_READ_ERROR.
This commit is contained in:
Christopher Faulet 2023-01-26 16:11:02 +01:00
parent 11fddb9655
commit b3ef9c392e

View File

@ -151,7 +151,7 @@ static int bwlim_apply_limit(struct filter *filter, struct channel *chn, unsigne
*/
ret = tokens;
if (tokens < conf->min_size) {
ret = (chn->flags & (CF_EOI|CF_SHUTR|CF_READ_ERROR))
ret = (chn->flags & (CF_EOI|CF_SHUTR))
? MIN(len, conf->min_size)
: conf->min_size;