]> 127.0.0.1 Git - part/.git/commitdiff
fix ptk v0.5.8
authorqydysky <qydysky@foxmail.com>
Mon, 12 Apr 2021 09:45:14 +0000 (17:45 +0800)
committerqydysky <qydysky@foxmail.com>
Mon, 12 Apr 2021 09:45:14 +0000 (17:45 +0800)
limit/Limit.go

index 1c9b16df48e21c7ff61ed31b6eec5e921586283d..edc7d0959008dd509501bde4c6b4641eb27c32dd 100644 (file)
@@ -38,7 +38,8 @@ func New(maxNum_in_period,ms_in_period,ms_to_timeout int) (*Limit) {
 
        //make sure the bucket is full
        for object.TK() != maxNum_in_period {}
-
+       object.pre_bucket_token_num = len(object.bucket)
+       
        return &object
 }