mirror of
https://github.com/fatedier/frp.git
synced 2026-08-24 09:18:51 +00:00
limit: clamp bandwidth limiter burst (#5471)
This commit is contained in:
@@ -66,7 +66,7 @@ func NewProxy(
|
||||
var limiter *rate.Limiter
|
||||
limitBytes := pxyConf.GetBaseConfig().Transport.BandwidthLimit.Bytes()
|
||||
if limitBytes > 0 && pxyConf.GetBaseConfig().Transport.BandwidthLimitMode == types.BandwidthLimitModeClient {
|
||||
limiter = rate.NewLimiter(rate.Limit(float64(limitBytes)), int(limitBytes))
|
||||
limiter = limit.NewBandwidthLimiter(limitBytes)
|
||||
}
|
||||
|
||||
baseProxy := BaseProxy{
|
||||
|
||||
Reference in New Issue
Block a user