fixed sending empty timeseries update
This commit is contained in:
parent
31229007a3
commit
70a9679bc8
@ -725,7 +725,11 @@ public class DefaultTbEntityDataSubscriptionService implements TbEntityDataSubsc
|
||||
update = new EntityDataUpdate(ctx.getCmdId(), ctx.getData(), null, ctx.getMaxEntitiesPerDataSubscription());
|
||||
ctx.setInitialDataSent(true);
|
||||
} else {
|
||||
update = new EntityDataUpdate(ctx.getCmdId(), null, ctx.getData().getData(), ctx.getMaxEntitiesPerDataSubscription());
|
||||
// to avoid updating timeseries with empty values
|
||||
List<EntityData> data = ctx.getData().getData().stream()
|
||||
.peek(entityData -> entityData.setTimeseries(null))
|
||||
.toList();
|
||||
update = new EntityDataUpdate(ctx.getCmdId(), null, data, ctx.getMaxEntitiesPerDataSubscription());
|
||||
}
|
||||
ctx.sendWsMsg(update);
|
||||
} finally {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user