Few minor improvements
This commit is contained in:
parent
0723988061
commit
35e91d27c9
@ -119,7 +119,7 @@ public class DefaultDeviceRpcService implements DeviceRpcService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void processRpcResponseFromDevice(FromDeviceRpcResponse response) {
|
public void processRpcResponseFromDevice(FromDeviceRpcResponse response) {
|
||||||
log.trace("response to request: [{}]", response.getId());
|
log.trace("[{}] Received device RPC response from server: [{}]", response.getId(), response.getServerAddress());
|
||||||
if (routingService.getCurrentServer().equals(response.getServerAddress())) {
|
if (routingService.getCurrentServer().equals(response.getServerAddress())) {
|
||||||
UUID requestId = response.getId();
|
UUID requestId = response.getId();
|
||||||
Consumer<FromDeviceRpcResponse> consumer = localToDeviceRpcRequests.remove(requestId);
|
Consumer<FromDeviceRpcResponse> consumer = localToDeviceRpcRequests.remove(requestId);
|
||||||
@ -151,7 +151,7 @@ public class DefaultDeviceRpcService implements DeviceRpcService {
|
|||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
RpcError error = proto.getError() > 0 ? RpcError.values()[proto.getError()] : null;
|
RpcError error = proto.getError() > 0 ? RpcError.values()[proto.getError()] : null;
|
||||||
FromDeviceRpcResponse response = new FromDeviceRpcResponse(new UUID(proto.getRequestIdMSB(), proto.getRequestIdLSB()), routingService.getCurrentServer(),
|
FromDeviceRpcResponse response = new FromDeviceRpcResponse(new UUID(proto.getRequestIdMSB(), proto.getRequestIdLSB()), serverAddress,
|
||||||
proto.getResponse(), error);
|
proto.getResponse(), error);
|
||||||
processRpcResponseFromDevice(response);
|
processRpcResponseFromDevice(response);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user