From ddc3b8575ef4dceba0fbb2d495e98e12ada650d4 Mon Sep 17 00:00:00 2001 From: yusing Date: Fri, 7 Feb 2025 03:07:21 +0800 Subject: [PATCH] fix startup panic when no notification provider is set --- internal/notif/dispatcher.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/notif/dispatcher.go b/internal/notif/dispatcher.go index aec19ca..c8431b2 100644 --- a/internal/notif/dispatcher.go +++ b/internal/notif/dispatcher.go @@ -42,6 +42,9 @@ func StartNotifDispatcher(parent task.Parent) *Dispatcher { } func Notify(msg *LogMessage) { + if dispatcher == nil { + return + } select { case <-dispatcher.task.Context().Done(): return