sockstats: switch label to enum
Makes it cheaper/simpler to persist values, and encourages reuse of labels as opposed to generating an arbitrary number. Updates tailscale/corp#9230 Updates #3363 Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
committed by
Mihai Parparita
parent
9687f3700d
commit
6ac6ddbb47
@@ -249,7 +249,7 @@ func (c *Client) upnpPort() uint16 {
|
||||
}
|
||||
|
||||
func (c *Client) listenPacket(ctx context.Context, network, addr string) (nettype.PacketConn, error) {
|
||||
ctx = sockstats.WithSockStats(ctx, "portmapper.Client")
|
||||
ctx = sockstats.WithSockStats(ctx, sockstats.LabelPortmapperClient)
|
||||
|
||||
// When running under testing conditions, we bind the IGD server
|
||||
// to localhost, and may be running in an environment where our
|
||||
|
||||
Reference in New Issue
Block a user