diff --git a/agent/client/cache/cache.go b/agent/client/cache/cache.go index 37ff100a48..abd5805665 100644 --- a/agent/client/cache/cache.go +++ b/agent/client/cache/cache.go @@ -73,14 +73,11 @@ func (c *Cache) Send(resp *models.AgentResponse) error { *agentpb.JobProgress, *agentpb.StopJobResponse, *agentpb.CheckConnectionResponse, - *agentpb.JobResult: + *agentpb.JobResult, + *agentpb.ServiceInfoResponse: cache = c.prioritized - case *agentpb.AgentLogsResponse, - *agentpb.Pong, - *agentpb.SetStateResponse: - cache = c.unprioritized default: - return nil + cache = c.unprioritized } return cache.Send(resp) } diff --git a/agent/client/client.go b/agent/client/client.go index 405724951d..f6ba5547a7 100644 --- a/agent/client/client.go +++ b/agent/client/client.go @@ -969,7 +969,10 @@ func (c *Client) sendAndWaitResponse(msg agentpb.AgentRequestPayload) (agentpb.S } func (c *Client) send(msg *models.AgentResponse) { - c.cache.Send(msg) //nolint:errcheck + err := c.cache.Send(msg) + if err != nil { + c.l.Error(err) + } } // check interface.