Skip to content

Commit 8ce8612

Browse files
committed
优化频率限制
1 parent 2b33421 commit 8ce8612

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func worker(stopCtx context.Context, uc tgbotapi.UpdatesChannel, cancelCh chan i
9595
for {
9696
select {
9797
case update := <-uc:
98+
utils.Limiter.Take()
9899
go router.Handle(update)
99100
case <-stopCtx.Done():
100101
cancelCh <- 1

0 commit comments

Comments
 (0)