Skip to content

Commit

Permalink
cmd/ipfs: error out on invalid routing option
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
  • Loading branch information
whyrusleeping committed Dec 8, 2016
1 parent 24d35f3 commit bc263a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
ncfg.Routing = corerouting.SupernodeClient(infos...)
case routingOptionDHTClientKwd:
ncfg.Routing = core.DHTClientOption
default:
res.SetError(fmt.Errorf("unrecognized routing option: %s", routingOption), cmds.ErrNormal)
return
}

node, err := core.NewNode(req.Context(), ncfg)
Expand Down

0 comments on commit bc263a0

Please sign in to comment.