diff --git a/pkg/client/client_v2.go b/pkg/client/client_v2.go index a8b0456..5bf360b 100644 --- a/pkg/client/client_v2.go +++ b/pkg/client/client_v2.go @@ -1101,6 +1101,11 @@ func recvExpectedChunked(client proto.ElasticAgent_CheckinV2Client, chunk bool) // first message in batch initialMsg = msg } else if initialMsg.UnitsTimestamp.AsTime() != msg.UnitsTimestamp.AsTime() { + // only used if the new timestamp is newer + if initialMsg.UnitsTimestamp.AsTime().After(msg.UnitsTimestamp.AsTime()) { + // not newer so we ignore the message + continue + } // different batch; restart initialMsg = msg }