Browse Source
Merge branch 'rc' into error-processing-resources
pull/12565/head
yevhenii_zahrebelnyi
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/actors/device/DeviceActorMessageProcessor.java
-
application/src/main/java/org/thingsboard/server/service/rpc/DefaultTbRuleEngineRpcService.java
|
|
|
@ -865,6 +865,8 @@ public class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcesso |
|
|
|
} |
|
|
|
|
|
|
|
private void notifyTransportAboutClosedSessionMaxSessionsLimit(UUID sessionId, SessionInfoMetaData sessionMd) { |
|
|
|
attributeSubscriptions.remove(sessionId); |
|
|
|
rpcSubscriptions.remove(sessionId); |
|
|
|
notifyTransportAboutClosedSession(sessionId, sessionMd, TransportSessionCloseReason.MAX_CONCURRENT_SESSIONS_LIMIT_REACHED); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -115,8 +115,9 @@ public class DefaultTbRuleEngineRpcService implements TbRuleEngineDeviceRpcServi |
|
|
|
ToDeviceRpcRequest request = new ToDeviceRpcRequest(src.getRequestUUID(), src.getTenantId(), src.getDeviceId(), |
|
|
|
src.isOneway(), src.getExpirationTime(), new ToDeviceRpcRequestBody(src.getMethod(), src.getBody()), src.isPersisted(), src.getRetries(), src.getAdditionalInfo()); |
|
|
|
forwardRpcRequestToDeviceActor(request, response -> { |
|
|
|
if (src.isRestApiCall()) { |
|
|
|
sendRpcResponseToTbCore(src.getOriginServiceId(), response); |
|
|
|
String originServiceId = src.getOriginServiceId(); |
|
|
|
if (src.isRestApiCall() && originServiceId != null) { |
|
|
|
sendRpcResponseToTbCore(originServiceId, response); |
|
|
|
} |
|
|
|
consumer.accept(RuleEngineDeviceRpcResponse.builder() |
|
|
|
.deviceId(src.getDeviceId()) |
|
|
|
|