예제 #1
0
        public override Task StartAsync(CancellationToken token)
        {
            //detect local member
            var localMember = this.localMember = FindMember(LocalMemberFinder) ?? throw new RaftProtocolException(ExceptionMessages.UnresolvedLocalMember);

            configurator?.Initialize(this, metadata);
            return(base.StartAsync(token));
        }
예제 #2
0
        public override Task StartAsync(CancellationToken token)
        {
            if (raftRpcTimeout > requestTimeout)
            {
                return(Task.FromException(new RaftProtocolException(ExceptionMessages.InvalidRpcTimeout)));
            }

            // detect local member
            var localMember = FindMember(LocalMemberFinder) ?? throw new RaftProtocolException(ExceptionMessages.UnresolvedLocalMember);

            this.localMember = localMember.Endpoint;
            configurator?.Initialize(this, metadata);
            return(base.StartAsync(token));
        }