From 9b4ab82044c67409fbd972d65d5b99e574b2748e Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Mon, 17 Oct 2022 15:46:19 -0500 Subject: [PATCH] fix: potential deadlock in coordinator (#4598) --- tailnet/coordinator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tailnet/coordinator.go b/tailnet/coordinator.go index ded78e64aa..fc48974ca7 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) }