Skip to content
Snippets Groups Projects
Unverified Commit 807976c4 authored by Pawan Rawal's avatar Pawan Rawal
Browse files

Remove timeout from JoinCluster.

parent f455229d
No related branches found
No related tags found
No related merge requests found
......@@ -716,11 +716,7 @@ func (n *node) joinPeers() error {
gconn := pl.Get()
c := intern.NewRaftClient(gconn)
x.Printf("Calling JoinCluster")
ctx, cancel := context.WithTimeout(n.ctx, time.Second)
defer cancel()
// JoinCluster can block indefinitely, raft ignores conf change proposal
// if it has pending configuration.
if _, err := c.JoinCluster(ctx, n.RaftContext); err != nil {
if _, err := c.JoinCluster(n.ctx, n.RaftContext); err != nil {
return x.Errorf("Error while joining cluster: %+v\n", err)
}
x.Printf("Done with JoinCluster call\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment