mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
Fix unlock of unlocked mutex in tailnet coordinator
This commit is contained in:
@ -153,12 +153,10 @@ func (c *coordinator) ServeClient(conn net.Conn, id uuid.UUID, agent uuid.UUID)
|
|||||||
if ok {
|
if ok {
|
||||||
data, err := json.Marshal([]*Node{node})
|
data, err := json.Marshal([]*Node{node})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.mutex.Unlock()
|
|
||||||
return xerrors.Errorf("marshal node: %w", err)
|
return xerrors.Errorf("marshal node: %w", err)
|
||||||
}
|
}
|
||||||
_, err = conn.Write(data)
|
_, err = conn.Write(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.mutex.Unlock()
|
|
||||||
return xerrors.Errorf("write nodes: %w", err)
|
return xerrors.Errorf("write nodes: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user