From 6eec531a32d198430550fe757390953e02ae963d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E5=98=89=E8=81=AA?= <9a6c5609806a@gmail.com> Date: Mon, 9 Sep 2019 21:12:31 +0800 Subject: [PATCH] fix: limit bug --- server/control.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/control.go b/server/control.go index ff8af62..78e6ca2 100755 --- a/server/control.go +++ b/server/control.go @@ -161,8 +161,8 @@ func NewControl(rc *controller.ResourceController, pxyManager *proxy.ProxyManage writerShutdown: shutdown.New(), managerShutdown: shutdown.New(), allShutdown: shutdown.New(), - inLimit: rate.NewLimiter(rate.Limit(inLimit*limit.KB), limit.BurstLimit), - outLimit: rate.NewLimiter(rate.Limit(outLimit*limit.KB), limit.BurstLimit), + inLimit: rate.NewLimiter(rate.Limit(inLimit*limit.KB), int(inLimit*limit.KB)), + outLimit: rate.NewLimiter(rate.Limit(outLimit*limit.KB), int(outLimit*limit.KB)), } }