fix some shutdown bugs and so on

This commit is contained in:
2026-07-10 16:04:00 +02:00
parent 01c73819c0
commit 98a4c81701
8 changed files with 98 additions and 4 deletions

View File

@@ -43,6 +43,7 @@ func NewMetrics(bufferSize int, flushTimeout time.Duration, file string) *Metric
c: make(chan RequestMetric, bufferSize),
ticker: time.NewTicker(flushTimeout),
file: file,
stop: make(chan struct{}),
}
}

View File

@@ -31,6 +31,7 @@ func NewLimiter(maxRequests int, refills int, refillInterval time.Duration, clea
bucketRefill: refills,
rwLock: &sync.RWMutex{},
rateChannel: make(chan string),
stop: make(chan struct{}),
}
}