fix startup panic when no notification provider is set

This commit is contained in:
yusing 2025-02-07 03:07:21 +08:00
parent 136a2ec89f
commit ddc3b8575e

View file

@ -42,6 +42,9 @@ func StartNotifDispatcher(parent task.Parent) *Dispatcher {
} }
func Notify(msg *LogMessage) { func Notify(msg *LogMessage) {
if dispatcher == nil {
return
}
select { select {
case <-dispatcher.task.Context().Done(): case <-dispatcher.task.Context().Done():
return return