outposts: cleanup logs for failed binds

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-11 22:09:18 +01:00
parent 534689895c
commit 8abc9cc031
3 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ func (ls *LDAPServer) StartLDAPServer() error {
ln, err := net.Listen("tcp", listen) ln, err := net.Listen("tcp", listen)
if err != nil { if err != nil {
ls.log.WithField("listen", listen).WithError(err).Fatalf("FATAL: listen failed") ls.log.WithField("listen", listen).WithError(err).Fatalf("listen failed")
} }
proxyListener := &proxyproto.Listener{Listener: ln} proxyListener := &proxyproto.Listener{Listener: ln}
defer proxyListener.Close() defer proxyListener.Close()

View File

@ -37,7 +37,7 @@ func (ls *LDAPServer) StartLDAPTLSServer() error {
ln, err := net.Listen("tcp", listen) ln, err := net.Listen("tcp", listen)
if err != nil { if err != nil {
ls.log.WithField("listen", listen).WithError(err).Fatalf("FATAL: listen failed") ls.log.WithField("listen", listen).WithError(err).Fatalf("listen failed")
} }
proxyListener := &proxyproto.Listener{Listener: ln} proxyListener := &proxyproto.Listener{Listener: ln}

View File

@ -103,7 +103,7 @@ func (ps *ProxyServer) ServeHTTP() {
listenAddress := fmt.Sprintf(ps.Listen, 9000+ps.PortOffset) listenAddress := fmt.Sprintf(ps.Listen, 9000+ps.PortOffset)
listener, err := net.Listen("tcp", listenAddress) listener, err := net.Listen("tcp", listenAddress)
if err != nil { if err != nil {
ps.log.Fatalf("FATAL: listen (%s) failed - %s", listenAddress, err) ps.log.WithField("listen", listenAddress).WithError(err).Fatalf("listen failed")
} }
proxyListener := &proxyproto.Listener{Listener: listener} proxyListener := &proxyproto.Listener{Listener: listener}
defer proxyListener.Close() defer proxyListener.Close()