Browse Source
Merge pull request #5953 from YevhenBondarenko/fix/lwm2m-subscription-info
[3.3.3] added updating session metadata if attributes/rpc subscription was sent by this way
pull/5954/head
Andrew Shvayka
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
0 deletions
-
common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/service/DefaultTransportService.java
|
|
|
@ -510,6 +510,16 @@ public class DefaultTransportService implements TransportService { |
|
|
|
public void process(TransportToDeviceActorMsg msg, TransportServiceCallback<Void> callback) { |
|
|
|
TransportProtos.SessionInfoProto sessionInfo = msg.getSessionInfo(); |
|
|
|
if (checkLimits(sessionInfo, msg, callback)) { |
|
|
|
SessionMetaData sessionMetaData = sessions.get(toSessionId(sessionInfo)); |
|
|
|
if (sessionMetaData != null) { |
|
|
|
if (msg.hasSubscribeToAttributes()) { |
|
|
|
sessionMetaData.setSubscribedToAttributes(true); |
|
|
|
} |
|
|
|
if (msg.hasSubscribeToRPC()) { |
|
|
|
sessionMetaData.setSubscribedToRPC(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
reportActivityInternal(sessionInfo); |
|
|
|
sendToDeviceActor(sessionInfo, msg, callback); |
|
|
|
} |
|
|
|
|