mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 18:04:14 +01:00
Do not call nil handler for a dummy queue (#24880)
A dummy queue doesn't really have a handler (see line 211), so the `safeHandler` can safely drop all items
This commit is contained in:
parent
cfadb1901f
commit
16a766cba1
1 changed files with 4 additions and 1 deletions
|
@ -239,8 +239,11 @@ 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))
|
||||
}
|
||||
}()
|
||||
if w.origHandler != nil {
|
||||
return w.origHandler(t...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
return &w, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue