fix listening on TCP only without listenfd
Alan Pearce alan@alanpearce.eu
Wed, 29 Jan 2025 23:06:11 +0100
1 files changed, 7 insertions(+), 1 deletions(-)
jump to
M internal/server/tcp.go → internal/server/tcp.go
@@ -1,11 +1,17 @@ package server import ( + "net" + "strconv" + "go.alanpearce.eu/x/listenfd" ) func (s *Server) serveTCP() error { - l, err := listenfd.GetListener(0, s.Addr, s.log.Named("tcp.listenfd")) + l, err := listenfd.GetListener(0, + net.JoinHostPort(s.runtimeConfig.ListenAddress, strconv.Itoa(s.runtimeConfig.Port)), + s.log.Named("tcp.listenfd"), + ) if err != nil { return err }