Skip to content

Commit

Permalink
Stop accepting inbound node before chord is ready
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Nov 2, 2018
1 parent 158d79c commit 8260b14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
6 changes: 3 additions & 3 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 1 addition & 11 deletions net/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,5 @@ import (
)

func StartProtocol(pubKey *crypto.PubKey, nn *nnet.NNet) (protocol.Noder, error) {
net, err := node.InitNode(pubKey, nn)
if err != nil {
return nil, err
}

err = nn.Start()
if err != nil {
return nil, err
}

return net, nil
return node.InitNode(pubKey, nn)
}
2 changes: 1 addition & 1 deletion nknd.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func nknMain(c *cli.Context) error {
return true
}))

err = nn.Start()
err = nn.Start(createMode)
if err != nil {
return err
}
Expand Down

0 comments on commit 8260b14

Please sign in to comment.