Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RC #18

Merged
merged 18 commits into from
Jan 30, 2025
Merged

RC #18

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/badges/jacoco.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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
@@ -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 {