envknob: support changing envknobs post-init
Updates #5114 Change-Id: Ia423fc7486e1b3f3180a26308278be0086fae49b Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
33ee2c058e
commit
74674b110d
@ -43,7 +43,7 @@ import (
|
||||
|
||||
// Debugging and experimentation tweakables.
|
||||
var (
|
||||
debugNetcheck = envknob.Bool("TS_DEBUG_NETCHECK")
|
||||
debugNetcheck = envknob.RegisterBool("TS_DEBUG_NETCHECK")
|
||||
)
|
||||
|
||||
// The various default timeouts for things.
|
||||
@ -210,7 +210,7 @@ func (c *Client) logf(format string, a ...any) {
|
||||
}
|
||||
|
||||
func (c *Client) vlogf(format string, a ...any) {
|
||||
if c.Verbose || debugNetcheck {
|
||||
if c.Verbose || debugNetcheck() {
|
||||
c.logf(format, a...)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user