Permalink
Browse files

Remove timeout from JoinCluster.

  • Loading branch information...
pawanrawal committed Mar 22, 2018
1 parent f455229 commit 807976c407b880cfac565cc709b6bee3c139f7f7
Showing with 1 addition and 5 deletions.
  1. +1 −5 worker/draft.go
View
@@ -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 comments on commit 807976c

Please sign in to comment.