From 152931e7c8048784f5933bb88be228c77e3b8ec5 Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Mon, 17 Oct 2022 19:30:18 +0000 Subject: [PATCH] fix: potential deadlock in coordinator --- tailnet/coordinator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tailnet/coordinator.go b/tailnet/coordinator.go index ded78e64aae97..fc48974ca7ce4 100644 --- a/tailnet/coordinator.go +++ b/tailnet/coordinator.go @@ -313,6 +313,7 @@ func (c *coordinator) handleNextAgentMessage(id uuid.UUID, decoder *json.Decoder } data, err := json.Marshal([]*Node{&node}) if err != nil { + c.mutex.Unlock() return xerrors.Errorf("marshal nodes: %w", err) }