all repos — searchix @ e766c8d6e4434b303246522ad29c4bc328de56ba

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: address linter issues

Alan Pearce
commit

e766c8d6e4434b303246522ad29c4bc328de56ba

parent

a34ba86c2c899bbf2902c4c99b817a9692c3294f

1 file changed, 5 insertions(+), 2 deletions(-)

changed files
M internal/server/server.gointernal/server/server.go
@@ -58,9 +58,12 @@ },
}, nil } -func (s *Server) Start() error { +func (s *Server) Start(ctx context.Context) error { listenAddress := net.JoinHostPort(s.cfg.Web.ListenAddress, strconv.Itoa(s.cfg.Web.Port)) - l, err := net.Listen("tcp", listenAddress) + lc := net.ListenConfig{ + KeepAlive: 5 * time.Minute, + } + l, err := lc.Listen(ctx, "tcp", listenAddress) if err != nil { return fault.Wrap( err, fmsg.Withf("could not listen on address %s and port %d",