diff --git a/managed/services/agents/channel/channel.go b/managed/services/agents/channel/channel.go index 5eec34e666..9153066248 100644 --- a/managed/services/agents/channel/channel.go +++ b/managed/services/agents/channel/channel.go @@ -201,7 +201,7 @@ func (c *Channel) send(msg *agentpb.ServerMessage) { atomic.AddUint32(&c.mSent, 1) } -// runReader receives messages from server. +// runReceiver receives messages from server. func (c *Channel) runReceiver() { defer func() { close(c.requests) diff --git a/managed/services/agents/service_info_broker.go b/managed/services/agents/service_info_broker.go index 3513dcb0af..4223365a7f 100644 --- a/managed/services/agents/service_info_broker.go +++ b/managed/services/agents/service_info_broker.go @@ -197,8 +197,12 @@ func updateServiceVersion(ctx context.Context, q *reform.Querier, resp agentpb.A l := logger.Get(ctx) version := resp.(*agentpb.ServiceInfoResponse).GetVersion() //nolint:forcetypeassert - service.Version = version + if version == "" { + return nil + } + l.Debugf("Updating service version: %s.", version) + service.Version = version if err := q.Update(service); err != nil { return errors.Wrap(err, "failed to update service version") }