@Override public CompletableFuture<ProxySession<S>> connect() { if (connectFuture == null) { synchronized (this) { if (connectFuture == null) { session.consumer().consume(1, this::consume); service.init(context); connectFuture = session.connect().thenApply(v -> this); } } } return connectFuture; }