fix: fix panic in agentsocket.SyncReady (#21913)

This commit is contained in:
Jon Ayers
2026-02-04 20:48:45 -06:00
committed by GitHub
parent 22ece10a4a
commit e914576167
+4 -1
View File
@@ -99,7 +99,10 @@ func (c *Client) SyncReady(ctx context.Context, unitName unit.ID) (bool, error)
resp, err := c.client.SyncReady(ctx, &proto.SyncReadyRequest{
Unit: string(unitName),
})
return resp.Ready, err
if err != nil {
return false, xerrors.Errorf("sync ready: %w", err)
}
return resp.Ready, nil
}
// SyncStatus gets the status of a unit and its dependencies.