diff --git a/cmd/tailscaled/depaware-minlinux.txt b/cmd/tailscaled/depaware-minlinux.txt index 058a92f18..979871c7f 100644 --- a/cmd/tailscaled/depaware-minlinux.txt +++ b/cmd/tailscaled/depaware-minlinux.txt @@ -70,7 +70,6 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de tailscale.com/net/packet from tailscale.com/net/packet/checksum+ tailscale.com/net/packet/checksum from tailscale.com/net/tstun tailscale.com/net/stun from tailscale.com/net/netcheck+ - L tailscale.com/net/tcpinfo from tailscale.com/derp tailscale.com/net/tlsdial from tailscale.com/control/controlclient+ tailscale.com/net/tsaddr from tailscale.com/ipn+ tailscale.com/net/tsdial from tailscale.com/cmd/tailscaled+ diff --git a/derp/derp_server_linux.go b/derp/derp_server_linux.go index bfc2aade6..df25c35fe 100644 --- a/derp/derp_server_linux.go +++ b/derp/derp_server_linux.go @@ -8,47 +8,9 @@ import ( "crypto/tls" "net" "time" - - "tailscale.com/net/tcpinfo" ) func (c *sclient) startStatsLoop(ctx context.Context) { - // Get the RTT initially to verify it's supported. - conn := c.tcpConn() - if conn == nil { - c.s.tcpRtt.Add("non-tcp", 1) - return - } - if _, err := tcpinfo.RTT(conn); err != nil { - c.logf("error fetching initial RTT: %v", err) - c.s.tcpRtt.Add("error", 1) - return - } - - const statsInterval = 10 * time.Second - - // Don't launch a goroutine; use a timer instead. - var gatherStats func() - gatherStats = func() { - // Do nothing if the context is finished. - if ctx.Err() != nil { - return - } - - // Reschedule ourselves when this stats gathering is finished. - defer c.s.clock.AfterFunc(statsInterval, gatherStats) - - // Gather TCP RTT information. - rtt, err := tcpinfo.RTT(conn) - if err == nil { - c.s.tcpRtt.Add(durationToLabel(rtt), 1) - } - - // TODO(andrew): more metrics? - } - - // Kick off the initial timer. - c.s.clock.AfterFunc(statsInterval, gatherStats) } // tcpConn attempts to get the underlying *net.TCPConn from this client's