1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Ignoe derp.yaml, don't panic in Serve()

This commit is contained in:
Eugen 2021-12-01 19:32:47 +01:00
parent 07a437c707
commit 7e95b3501d
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@
/headscale
config.json
config.yaml
derp.yaml
*.key
/db.sqlite
*.sqlite3

6
app.go
View File

@ -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.