ensure whenMoreResolved resolves to eventual client in PromiseClient
This commit is contained in:
parent
af229ccb99
commit
0c4e98848e
1 changed files with 9 additions and 11 deletions
|
@ -1824,13 +1824,11 @@ final class RpcState<VatId> {
|
|||
Integer importId) {
|
||||
this.cap = initial;
|
||||
this.importId = importId;
|
||||
this.eventual = eventual.whenComplete((resolution, exc) -> {
|
||||
if (exc == null) {
|
||||
this.resolve(resolution);
|
||||
}
|
||||
else {
|
||||
this.resolve(Capability.newBrokenCap(exc));
|
||||
}
|
||||
this.eventual = eventual.handle((resolution, exc) -> {
|
||||
this.cap = exc == null
|
||||
? this.resolve(resolution)
|
||||
: this.resolve(Capability.newBrokenCap(exc));
|
||||
return this.cap;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1954,15 +1952,15 @@ final class RpcState<VatId> {
|
|||
ClientHook finalReplacement = replacement;
|
||||
var embargoPromise = embargo.disembargo.thenApply(
|
||||
void_ -> finalReplacement);
|
||||
replacement = Capability.newLocalPromiseClient(embargoPromise);
|
||||
LOGGER.info(() -> RpcState.this.toString() + ": > DISEMBARGO");
|
||||
message.send();
|
||||
return Capability.newLocalPromiseClient(embargoPromise);
|
||||
}
|
||||
|
||||
this.cap = replacement;
|
||||
else {
|
||||
return replacement;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class PipelineClient extends RpcClient {
|
||||
|
||||
|
|
Loading…
Reference in a new issue