Fix for first issue from #1652 on computation of time to wait in AbstractTrafficShapingHandler for Netty 4
Fix for first issue from #1652 on computation of time to wait in AbstractTrafficShapingHandler for Netty 4, using the same formula than in Netty 3 (wrong place for parenthese). Was: (bytes * 1000 / limit - interval / 10) * 10; Becomes: (bytes * 1000 / limit - interval) / 10 * 10;
This commit is contained in:
parent
15279b2525
commit
61b1214b24
@ -205,7 +205,7 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
|
|||||||
// Time is too short, so just lets continue
|
// Time is too short, so just lets continue
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return (bytes * 1000 / limit - interval / 10) * 10;
|
return (bytes * 1000 / limit - interval) / 10 * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user