Skip to content

Commit

Permalink
Remove timeout from JoinCluster.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawan Rawal committed Mar 22, 2018
1 parent f455229 commit 807976c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions worker/draft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 807976c

Please sign in to comment.