diff options
Diffstat (limited to 'sd_daemon/notify.go')
-rw-r--r-- | sd_daemon/notify.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd_daemon/notify.go b/sd_daemon/notify.go index 8fce6da..b159a22 100644 --- a/sd_daemon/notify.go +++ b/sd_daemon/notify.go @@ -40,7 +40,7 @@ var errNotifyNoSocket = errors.New("No socket") // assignments. func Notify(unsetEnv bool, state string) error { if unsetEnv { - defer os.Unsetenv("NOTIFY_SOCKET") + defer func() { _ = os.Unsetenv("NOTIFY_SOCKET") }() } socketAddr := &net.UnixAddr{ @@ -56,7 +56,7 @@ func Notify(unsetEnv bool, state string) error { if err != nil { return err } - defer conn.Close() + defer func() { _ = conn.Close() }() _, err = conn.Write([]byte(state)) return err |