fix some shutdown bugs and so on
This commit is contained in:
@@ -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{}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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{}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user