This commit is contained in:
alex.sharov 2023-04-19 13:01:21 +07:00
parent e308cfbdf8
commit b8a02642e2

View File

@ -181,6 +181,7 @@ func (q *QueueWithRetry) popWait(ctx context.Context) (task *TxTask, ok bool) {
case inTask, ok := <-q.newTasks:
if !ok {
q.retiresLock.Lock()
log.Warn("[dbg] Next: see closed chan, read task from queue", "q.retires.Len()", q.retires.Len())
if q.retires.Len() > 0 {
task = heap.Pop(&q.retires).(*TxTask)
}