Commit 1f58c1b0d6e996cd9a37a5e521e575a5a3edaf41
1 parent
0546cb1e
Fix subscription service: ignore unmatched updates.
Showing
2 changed files
with
1 additions
and
2 deletions
... | ... | @@ -46,7 +46,6 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements Telemetr |
46 | 46 | private static final ConcurrentMap<String, String> externalSessionMap = new ConcurrentHashMap<>(); |
47 | 47 | |
48 | 48 | @Autowired |
49 | - @Lazy | |
50 | 49 | private TelemetryWebSocketService webSocketService; |
51 | 50 | |
52 | 51 | @Override | ... | ... |
... | ... | @@ -432,7 +432,7 @@ public class DefaultTelemetrySubscriptionService implements TelemetrySubscriptio |
432 | 432 | deviceSubscriptions.stream().filter(filter).forEach(s -> { |
433 | 433 | String sessionId = s.getWsSessionId(); |
434 | 434 | List<TsKvEntry> subscriptionUpdate = f.apply(s); |
435 | - if (subscriptionUpdate == null || !subscriptionUpdate.isEmpty()) { | |
435 | + if (subscriptionUpdate != null && !subscriptionUpdate.isEmpty()) { | |
436 | 436 | SubscriptionUpdate update = new SubscriptionUpdate(s.getSubscriptionId(), subscriptionUpdate); |
437 | 437 | if (s.isLocal()) { |
438 | 438 | updateSubscriptionState(sessionId, s, update); | ... | ... |