Merge pull request #12497 from YevhenBondarenko/fix/prod-5464

fixed NPE in sendRpcResponseToTbCore
This commit is contained in:
Viacheslav Klimov 2025-02-03 11:44:20 +02:00 committed by GitHub
commit cf53074d13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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())