Skip to content

Commit fe03a35

Browse files
MindgamesnlDuckelekuukgithub-actions[bot]
authored
Develop (#16)
* 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>
1 parent 583fd9d commit fe03a35

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

meteor-core/src/main/java/dev/pixelib/meteor/core/trackers/OutgoingInvocationTracker.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,21 @@ public <T> T invokeRemoteMethod(InvocationDescriptor invocationDescriptor) throw
5050
}
5151
}
5252

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

6161
pendingInvocation.complete(invocationResponse.getResult());
6262

6363
// remove the pending invocation from the map
6464
pendingInvocations.remove(invocationResponse.getInvocationId());
65+
66+
// invocation was successfully completed
67+
return true;
6568
}
6669

6770
}

meteor-core/src/main/java/dev/pixelib/meteor/core/transport/TransportHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ public TransportHandler(
4949

5050
private boolean handleInvocationResponse(byte[] bytes) throws ClassNotFoundException {
5151
InvocationResponse invocationResponse = InvocationResponse.fromBytes(serializer, bytes);
52-
outgoingInvocationTracker.completeInvocation(invocationResponse);
53-
return true;
52+
return outgoingInvocationTracker.completeInvocation(invocationResponse);
5453
}
5554

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

0 commit comments

Comments
 (0)