Skip to content

Commit

Permalink
Develop (#16)
Browse files Browse the repository at this point in the history
* Updated version in readme, added mvn central badge, fix typo

* Added multiply example

* Optimized all imports

* Log errors thrown by implementations (#8)

* Version bump

* Add JaCoCo badge

* Bump jedis due to org.json cve

* Update develop (#10)

* Release (#9)

* Updated version in readme, added mvn central badge, fix typo

* Added multiply example

* Optimized all imports

* Log errors thrown by implementations (#8)

* Version bump

---------

Co-authored-by: Duckelekuuk <[email protected]>
Co-authored-by: Duckelekuuk <[email protected]>

* Add JaCoCo badge

---------

Co-authored-by: Duckelekuuk <[email protected]>
Co-authored-by: Duckelekuuk <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>

* Make redis ignore itself, if configured (#13)

* Add JaCoCo badge

* Gracefully handle deadends (#15)

---------

Co-authored-by: Duckelekuuk <[email protected]>
Co-authored-by: Duckelekuuk <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
4 people committed Mar 6, 2024
1 parent 583fd9d commit fe03a35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,21 @@ public <T> T invokeRemoteMethod(InvocationDescriptor invocationDescriptor) throw
}
}

public void completeInvocation(InvocationResponse invocationResponse) {
public boolean completeInvocation(InvocationResponse invocationResponse) {
// do we have a pending invocation for this invocation id?
PendingInvocation<?> pendingInvocation = pendingInvocations.get(invocationResponse.getInvocationId());
if (pendingInvocation == null) {
throw new IllegalStateException("No pending invocation found for invocation id " + invocationResponse.getInvocationId() + ". Data: " + invocationResponse.getResult());
//return;
// we cannot handle this invocation, so it must be handled in another listener
return false;
}

pendingInvocation.complete(invocationResponse.getResult());

// remove the pending invocation from the map
pendingInvocations.remove(invocationResponse.getInvocationId());

// invocation was successfully completed
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ public TransportHandler(

private boolean handleInvocationResponse(byte[] bytes) throws ClassNotFoundException {
InvocationResponse invocationResponse = InvocationResponse.fromBytes(serializer, bytes);
outgoingInvocationTracker.completeInvocation(invocationResponse);
return true;
return outgoingInvocationTracker.completeInvocation(invocationResponse);
}

private boolean handleInvocationRequest(byte[] bytes) throws ClassNotFoundException {
Expand Down

0 comments on commit fe03a35

Please sign in to comment.