return this network via asConnection()
This commit is contained in:
parent
4f8c5faef4
commit
c903cbf193
1 changed files with 4 additions and 2 deletions
|
@ -46,13 +46,15 @@ public class TwoPartyVatNetwork
|
||||||
}
|
}
|
||||||
|
|
||||||
private Connection connect(RpcTwoPartyProtocol.VatId.Reader vatId) {
|
private Connection connect(RpcTwoPartyProtocol.VatId.Reader vatId) {
|
||||||
return vatId.getSide() != side ? this : null;
|
return vatId.getSide() != side
|
||||||
|
? this.asConnection()
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private CompletableFuture<Connection> accept() {
|
private CompletableFuture<Connection> accept() {
|
||||||
if (side == RpcTwoPartyProtocol.Side.SERVER & !accepted) {
|
if (side == RpcTwoPartyProtocol.Side.SERVER & !accepted) {
|
||||||
accepted = true;
|
accepted = true;
|
||||||
return CompletableFuture.completedFuture(this);
|
return CompletableFuture.completedFuture(this.asConnection());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// never completes
|
// never completes
|
||||||
|
|
Loading…
Reference in a new issue