From 36bc98ddae7315e035acb5282fc1838b9785b507 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 26 Jun 2023 14:48:21 +0000 Subject: [PATCH] chore: use mutex around `blockEndpoints` https://github.com/coder/coder/actions/runs/5378950122/jobs/9759972142 --- tailnet/conn.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tailnet/conn.go b/tailnet/conn.go index bbe0b3a531117..363ccb80ff48c 100644 --- a/tailnet/conn.go +++ b/tailnet/conn.go @@ -709,9 +709,11 @@ func (c *Conn) selfNode() *Node { DERPLatency: derpLatency, DERPForcedWebsocket: derpForcedWebsocket, } + c.mutex.Lock() if c.blockEndpoints { node.Endpoints = nil } + c.mutex.Unlock() return node }