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) {
|
Integer importId) {
|
||||||
this.cap = initial;
|
this.cap = initial;
|
||||||
this.importId = importId;
|
this.importId = importId;
|
||||||
this.eventual = eventual.whenComplete((resolution, exc) -> {
|
this.eventual = eventual.handle((resolution, exc) -> {
|
||||||
if (exc == null) {
|
this.cap = exc == null
|
||||||
this.resolve(resolution);
|
? this.resolve(resolution)
|
||||||
}
|
: this.resolve(Capability.newBrokenCap(exc));
|
||||||
else {
|
return this.cap;
|
||||||
this.resolve(Capability.newBrokenCap(exc));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1954,15 +1952,15 @@ final class RpcState<VatId> {
|
||||||
ClientHook finalReplacement = replacement;
|
ClientHook finalReplacement = replacement;
|
||||||
var embargoPromise = embargo.disembargo.thenApply(
|
var embargoPromise = embargo.disembargo.thenApply(
|
||||||
void_ -> finalReplacement);
|
void_ -> finalReplacement);
|
||||||
replacement = Capability.newLocalPromiseClient(embargoPromise);
|
|
||||||
LOGGER.info(() -> RpcState.this.toString() + ": > DISEMBARGO");
|
LOGGER.info(() -> RpcState.this.toString() + ": > DISEMBARGO");
|
||||||
message.send();
|
message.send();
|
||||||
|
return Capability.newLocalPromiseClient(embargoPromise);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
this.cap = replacement;
|
|
||||||
return replacement;
|
return replacement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private class PipelineClient extends RpcClient {
|
private class PipelineClient extends RpcClient {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue