From 38ebc483588a7355b565e5c96f8e3f1742804961 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 16 Feb 2021 13:15:50 +0100 Subject: tunnel: simplify panic printing Now that we're intercepting println, we don't need this. Signed-off-by: Jason A. Donenfeld --- tunnel/service.go | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'tunnel/service.go') diff --git a/tunnel/service.go b/tunnel/service.go index 22bbf5a0..4b02a503 100644 --- a/tunnel/service.go +++ b/tunnel/service.go @@ -12,8 +12,6 @@ import ( "net" "os" "runtime" - "runtime/debug" - "strings" "time" "golang.org/x/sys/windows/svc" @@ -108,16 +106,6 @@ func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest, serviceError = services.ErrorRingloggerOpen return } - defer func() { - if x := recover(); x != nil { - for _, line := range append([]string{fmt.Sprint(x)}, strings.Split(string(debug.Stack()), "\n")...) { - if len(strings.TrimSpace(line)) > 0 { - log.Println(line) - } - } - panic(x) - } - }() config, err = conf.LoadFromPath(service.Path) if err != nil { -- cgit v1.2.3-59-g8ed1b