Merge pull request #4213 from fahedouch/remove_unnecessary_condition
remove if condition because it is handled by the sdNotify daemon func
This commit is contained in:
commit
3f95bc5f18
@ -20,7 +20,6 @@ package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
sd "github.com/coreos/go-systemd/v22/daemon"
|
||||
|
||||
@ -38,7 +37,6 @@ func notifyStopping(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func sdNotify(ctx context.Context, state string) error {
|
||||
if os.Getenv("NOTIFY_SOCKET") != "" {
|
||||
notified, err := sd.SdNotify(false, state)
|
||||
log.G(ctx).
|
||||
WithError(err).
|
||||
@ -47,6 +45,3 @@ func sdNotify(ctx context.Context, state string) error {
|
||||
Debug("sd notification")
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user