Skip to content

Commit

Permalink
Change to proper error logs if NOTIFY_SOCKET is present
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus committed Jul 24, 2023
1 parent 8111fca commit ad4753f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/nebula/notify_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ func notifyReady(l *logrus.Logger) {

conn, err := net.DialTimeout("unixgram", sockName, time.Second)
if err != nil {
l.WithError(err).Debugln("failed to connect to systemd notification socket")
l.WithError(err).Error("failed to connect to systemd notification socket")
return
}
defer conn.Close()

err = conn.SetWriteDeadline(time.Now().Add(time.Second))
if err != nil {
l.WithError(err).Debugln("failed to set the write deadline for the systemd notification socket")
l.WithError(err).Error("failed to set the write deadline for the systemd notification socket")
return
}

if _, err = conn.Write([]byte(SdNotifyReady)); err != nil {
l.WithError(err).Debugln("failed to signal the systemd notification socket")
l.WithError(err).Error("failed to signal the systemd notification socket")
return
}

Expand Down

0 comments on commit ad4753f

Please sign in to comment.