Skip to content

Commit

Permalink
small code improvement;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Oct 21, 2021
1 parent 76e988a commit 8ab9278
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,17 @@ private void handleInboundResponseOrAcknowledgement(final Signal<?> responseOrAc
}
}

final ActorContext context = getContext();
final var context = getContext();
final var proxyActor = settings.getProxyActor();
final Consumer<ActorRef> action = acknowledgementForwarder -> {
if (responseOrAck instanceof ThingQueryCommandResponse && isLiveResponse(responseOrAck)) {
// forward live command responses to concierge to filter response
settings.getProxyActor().tell(responseOrAck, getSender());
proxyActor.tell(responseOrAck, getSender());
} else {
acknowledgementForwarder.forward(responseOrAck, context);
}
};

final Runnable emptyAction = () -> {
final var forwarderActorClassName = AcknowledgementForwarderActor.class.getSimpleName();
final var template = "No {} found. Forwarding signal to concierge. <{}>";
Expand Down

0 comments on commit 8ab9278

Please sign in to comment.