Unverified Commit 6c31eb9b authored by K900's avatar K900 Committed by GitHub
Browse files

Merge pull request #254934 from NetaliDev/headscale-sigterm-fix

headscale: fix reacting to SIGTERM
parents 3a6a2291 37947d59
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,10 @@ buildGoModule rec {
  patches = [
    # backport of https://github.com/juanfont/headscale/pull/1697
    ./trim-oidc-secret-path.patch

    # fix for headscale not reacting to SIGTERM
    # see https://github.com/juanfont/headscale/pull/1480 and https://github.com/juanfont/headscale/issues/1461
    ./sigterm-fix.patch
  ];

  ldflags = ["-s" "-w" "-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}"];
+12 −0
Original line number Diff line number Diff line
diff --git a/hscontrol/app.go b/hscontrol/app.go
index b8dceba..4bcf019 100644
--- a/hscontrol/app.go
+++ b/hscontrol/app.go
@@ -821,6 +821,7 @@ func (h *Headscale) Serve() error {

 				// And we're done:
 				cancel()
+ 				return
 			}
 		}
 	}