Skip to content

Commit 6f410f2

Browse files
authored
fix run once issue (#173)
1 parent cc177ed commit 6f410f2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pkg/notification/manager.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"sync"
55

66
"github.com/TimothyYe/godns/internal/settings"
7-
"github.com/TimothyYe/godns/pkg/lib"
87

98
log "github.com/sirupsen/logrus"
109
)
@@ -72,10 +71,8 @@ func initNotifications(conf *settings.Settings) map[string]INotification {
7271

7372
func (n *notificationManager) Send(domain, currentIP string) {
7473
for _, sender := range n.notifications {
75-
lib.SafeGo(func() {
76-
if err := sender.Send(domain, currentIP); err != nil {
77-
log.Error("Send notification with error:", err)
78-
}
79-
})
74+
if err := sender.Send(domain, currentIP); err != nil {
75+
log.Error("Send notification with error:", err)
76+
}
8077
}
8178
}

0 commit comments

Comments
 (0)