diff --git a/queue.go b/queue.go index ac6f981..3fdcf19 100644 --- a/queue.go +++ b/queue.go @@ -538,6 +538,10 @@ func (q *RateEnvelopeQueue) Stop() { q.setState(StateStopped) q.lifecycleMu.Unlock() + if runCancel != nil { + runCancel() + } + q.queueMu.Lock() q.queue = nil q.queueMu.Unlock()