Skip to content

Do not call nil handler for a dummy queue #24880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/queue/workerqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ func NewWorkerPoolQueueBySetting[T any](name string, queueSetting setting.QueueS
log.Error("Recovered from panic in queue %q handler: %v\n%s", name, err, log.Stack(2))
}
}()
return w.origHandler(t...)
if w.origHandler != nil {
return w.origHandler(t...)
}
return nil
}

return &w, nil
Expand Down