Skip to content

Commit

Permalink
Added support to NewJsonRpc to return an error as well as an interface
Browse files Browse the repository at this point in the history
Also changed default port to 8080. Fixes ethereum#18
  • Loading branch information
Maran committed May 13, 2014
1 parent 3647cc5 commit a9d5656
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ethrpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ func (s *JsonRpcServer) Start() {
}
}

func NewJsonRpcServer(ethp *ethpub.PEthereum) *JsonRpcServer {
l, err := net.Listen("tcp", ":30304")
func NewJsonRpcServer(ethp *ethpub.PEthereum) (*JsonRpcServer, error) {
l, err := net.Listen("tcp", ":8080")
if err != nil {
ethutil.Config.Log.Infoln("Error starting JSON-RPC")
return nil, err
}

return &JsonRpcServer{
listener: l,
quit: make(chan bool),
ethp: ethp,
}
}, nil
}

0 comments on commit a9d5656

Please sign in to comment.