Add info message regarding socket-activation

Signed-off-by: Geoffrey Hausheer <rc2012@pblue.org>
This commit is contained in:
Geoffrey Hausheer 2023-09-20 09:48:10 -07:00 committed by PhracturedBlue
parent 741f9bb564
commit 9721db9504

View file

@ -7,6 +7,7 @@ import (
"time" "time"
"github.com/coreos/go-systemd/v22/activation" "github.com/coreos/go-systemd/v22/activation"
log "github.com/sirupsen/logrus"
) )
// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted // tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
@ -47,6 +48,7 @@ func NewListener(net, laddr string) (net.Listener, error) {
return nil, fmt.Errorf("unknown address type %s", net) return nil, fmt.Errorf("unknown address type %s", net)
} }
case 1: case 1:
log.Info("Socet-activation is being used. Overriding requested address")
return listeners[0], nil return listeners[0], nil
default: default:
return nil, fmt.Errorf("Found %d socket-activation listeners, only expected 1", len(listeners)) return nil, fmt.Errorf("Found %d socket-activation listeners, only expected 1", len(listeners))