diff --git a/.gitignore b/.gitignore index 610550b..ddec49c 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ /headscale config.json config.yaml +derp.yaml *.key /db.sqlite *.sqlite3 diff --git a/app.go b/app.go index db78890..0fe6576 100644 --- a/app.go +++ b/app.go @@ -418,12 +418,12 @@ func (h *Headscale) Serve() error { err = h.ensureUnixSocketIsAbsent() if err != nil { - panic(err) + return err } socketListener, err := net.Listen("unix", h.cfg.UnixSocket) if err != nil { - panic(err) + return err } // Handle common process-killing signals so we can gracefully shut down: @@ -441,7 +441,7 @@ func (h *Headscale) Serve() error { networkListener, err := net.Listen("tcp", h.cfg.Addr) if err != nil { - panic(err) + return err } // Create the cmux object that will multiplex 2 protocols on the same port.