Ocpp: ensure meter updates with identical timestamp are processed (#15641)

This commit is contained in:
andig 2024-08-24 12:00:43 +02:00 • committed by GitHub
parent cd1706d038
commit 208f113346
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,7 @@ func (conn *Connector) MeterValues(request *core.MeterValuesRequest) (*core.Mete
for _, meterValue := range sortByAge(request.MeterValue) {
// ignore old meter value requests
if meterValue.Timestamp.Time.After(conn.meterUpdated) {
if !meterValue.Timestamp.Time.Before(conn.meterUpdated) {
for _, sample := range meterValue.SampledValue {
sample.Value = strings.TrimSpace(sample.Value)
conn.measurements[getSampleKey(sample)] = sample