update bandwidth_limit

This commit is contained in:
fatedier committed 2019-11-09 01:13:30 +08:00
1 parent 2ab832bb89
commit 12cc53d699
4 files changed
+74 -22

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ type Proxy interface {
func NewProxy(ctx context.Context, pxyConf config.ProxyConf, clientCfg config.ClientCommonConf, serverUDPPort int) (pxy Proxy) {
var limiter *rate.Limiter
limitBytes := pxyConf.GetBaseInfo().BandwithLimit.Bytes()
limitBytes := pxyConf.GetBaseInfo().BandwidthLimit.Bytes()
if limitBytes > 0 {
limiter = rate.NewLimiter(rate.Limit(float64(limitBytes)), int(limitBytes))
}