From ef6a6e94f143dee5c715edaaa2e0fa0f6cec504b Mon Sep 17 00:00:00 2001 From: Anton Tolchanov Date: Mon, 6 Nov 2023 11:19:14 +0000 Subject: [PATCH] derp/derphttp: use a getter method to read server key To hold the mutex while accessing it. Fixes #10122 Signed-off-by: Anton Tolchanov --- derp/derphttp/derphttp_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/derp/derphttp/derphttp_client.go b/derp/derphttp/derphttp_client.go index cf2868ae3..b2933ab4c 100644 --- a/derp/derphttp/derphttp_client.go +++ b/derp/derphttp/derphttp_client.go @@ -100,7 +100,7 @@ type Client struct { } func (c *Client) String() string { - return fmt.Sprintf("", c.serverPubKey.ShortString(), c.url) + return fmt.Sprintf("", c.ServerPublicKey().ShortString(), c.url) } // NewRegionClient returns a new DERP-over-HTTP client. It connects lazily.