aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/service/service_manager.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-16 16:47:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-16 17:14:52 +0200
commitd260908423e877c04bf386de6a6f644dcf8ebd70 (patch)
treed1c41aa36d5f6305b03d8274d85d6ab454c682bf /service/service_manager.go
parentservice: print useragent in log (diff)
downloadwireguard-windows-d260908423e877c04bf386de6a6f644dcf8ebd70.tar.xz
wireguard-windows-d260908423e877c04bf386de6a6f644dcf8ebd70.zip
service: silently ignore routes that won't have a gateway
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'service/service_manager.go')
-rw-r--r--service/service_manager.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/service/service_manager.go b/service/service_manager.go
index 58c2d863..5bd94e0e 100644
--- a/service/service_manager.go
+++ b/service/service_manager.go
@@ -7,10 +7,12 @@ package service
import (
"errors"
+ "fmt"
"log"
"os"
"runtime"
"runtime/debug"
+ "strings"
"sync"
"syscall"
"time"
@@ -47,7 +49,11 @@ func (service *managerService) Execute(args []string, r <-chan svc.ChangeRequest
}
defer func() {
if x := recover(); x != nil {
- log.Printf("%v:\n%s", x, string(debug.Stack()))
+ 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)
}
}()