From 1b30874cf8a7e164481a0b1b5e277abe906dd795 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Fri, 23 Apr 2021 17:16:12 -0400 Subject: [PATCH] Check for errors from the Serve() function. --- cmd/headscale/headscale.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/headscale/headscale.go b/cmd/headscale/headscale.go index 8e8c0059..bedfdb92 100644 --- a/cmd/headscale/headscale.go +++ b/cmd/headscale/headscale.go @@ -49,7 +49,10 @@ var serveCmd = &cobra.Command{ if err != nil { log.Fatalf("Error initializing: %s", err) } - h.Serve() + err = h.Serve() + if err != nil { + log.Fatalf("Error initializing: %s", err) + } }, }