Fix unlock of unlocked mutex in tailnet coordinator

This commit is contained in:
Kyle Carberry 2022-10-17 23:51:41 +00:00
parent 211ffabe39
commit 7851fb1c99
1 changed files with 0 additions and 2 deletions

View File

@ -153,12 +153,10 @@ func (c *coordinator) ServeClient(conn net.Conn, id uuid.UUID, agent uuid.UUID)
if ok {
data, err := json.Marshal([]*Node{node})
if err != nil {
c.mutex.Unlock()
return xerrors.Errorf("marshal node: %w", err)
}
_, err = conn.Write(data)
if err != nil {
c.mutex.Unlock()
return xerrors.Errorf("write nodes: %w", err)
}
}