mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
wgengine/magicsock: turn off DERP log spamminess by default
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
accf868130
commit
8696b17b5f
@ -534,6 +534,8 @@ type derpReadResult struct {
|
|||||||
copyBuf func(dst []byte) int
|
copyBuf func(dst []byte) int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var logDerpVerbose, _ = strconv.ParseBool(os.Getenv("DEBUG_DERP_VERBOSE"))
|
||||||
|
|
||||||
// runDerpReader runs in a goroutine for the life of a DERP
|
// runDerpReader runs in a goroutine for the life of a DERP
|
||||||
// connection, handling received packets.
|
// connection, handling received packets.
|
||||||
func (c *Conn) runDerpReader(derpFakeAddr *net.UDPAddr, dc *derphttp.Client) {
|
func (c *Conn) runDerpReader(derpFakeAddr *net.UDPAddr, dc *derphttp.Client) {
|
||||||
@ -569,7 +571,9 @@ func (c *Conn) runDerpReader(derpFakeAddr *net.UDPAddr, dc *derphttp.Client) {
|
|||||||
// TODO: handle endpoint notification messages.
|
// TODO: handle endpoint notification messages.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Printf("got derp %v packet: %q", derpFakeAddr, buf[:bufValid])
|
if logDerpVerbose {
|
||||||
|
log.Printf("got derp %v packet: %q", derpFakeAddr, buf[:bufValid])
|
||||||
|
}
|
||||||
select {
|
select {
|
||||||
case <-c.donec:
|
case <-c.donec:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user