derp/derphttp: use a getter method to read server key

To hold the mutex while accessing it.

Fixes #10122

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
awly/version-override
Anton Tolchanov 1 year ago committed by Anton Tolchanov
parent 44c6909c92
commit ef6a6e94f1

@ -100,7 +100,7 @@ type Client struct {
} }
func (c *Client) String() string { func (c *Client) String() string {
return fmt.Sprintf("<derphttp_client.Client %s url=%s>", c.serverPubKey.ShortString(), c.url) return fmt.Sprintf("<derphttp_client.Client %s url=%s>", c.ServerPublicKey().ShortString(), c.url)
} }
// NewRegionClient returns a new DERP-over-HTTP client. It connects lazily. // NewRegionClient returns a new DERP-over-HTTP client. It connects lazily.

Loading…
Cancel
Save