Commit fe03a35 1 parent 583fd9d commit fe03a35 Copy full SHA for fe03a35
File tree 2 files changed +7
-5
lines changed
meteor-core/src/main/java/dev/pixelib/meteor/core
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -50,18 +50,21 @@ public <T> T invokeRemoteMethod(InvocationDescriptor invocationDescriptor) throw
50
50
}
51
51
}
52
52
53
- public void completeInvocation (InvocationResponse invocationResponse ) {
53
+ public boolean completeInvocation (InvocationResponse invocationResponse ) {
54
54
// do we have a pending invocation for this invocation id?
55
55
PendingInvocation <?> pendingInvocation = pendingInvocations .get (invocationResponse .getInvocationId ());
56
56
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 ;
59
59
}
60
60
61
61
pendingInvocation .complete (invocationResponse .getResult ());
62
62
63
63
// remove the pending invocation from the map
64
64
pendingInvocations .remove (invocationResponse .getInvocationId ());
65
+
66
+ // invocation was successfully completed
67
+ return true ;
65
68
}
66
69
67
70
}
Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ public TransportHandler(
49
49
50
50
private boolean handleInvocationResponse (byte [] bytes ) throws ClassNotFoundException {
51
51
InvocationResponse invocationResponse = InvocationResponse .fromBytes (serializer , bytes );
52
- outgoingInvocationTracker .completeInvocation (invocationResponse );
53
- return true ;
52
+ return outgoingInvocationTracker .completeInvocation (invocationResponse );
54
53
}
55
54
56
55
private boolean handleInvocationRequest (byte [] bytes ) throws ClassNotFoundException {
You can’t perform that action at this time.
0 commit comments