mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-08 09:07:44 +00:00
wgengine: add debug knob to disable the watchdog during debugging
It launches goroutines and interferes with panic-based debugging, obscuring stacks.
This commit is contained in:
parent
3669296cef
commit
4970e771ab
@ -6,7 +6,9 @@
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -24,6 +26,9 @@
|
|||||||
//
|
//
|
||||||
// If they do not, the watchdog crashes the process.
|
// If they do not, the watchdog crashes the process.
|
||||||
func NewWatchdog(e Engine) Engine {
|
func NewWatchdog(e Engine) Engine {
|
||||||
|
if v, _ := strconv.ParseBool(os.Getenv("TS_DEBUG_DISABLE_WATCHDOG")); v {
|
||||||
|
return e
|
||||||
|
}
|
||||||
return &watchdogEngine{
|
return &watchdogEngine{
|
||||||
wrap: e,
|
wrap: e,
|
||||||
logf: log.Printf,
|
logf: log.Printf,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user