rpc.StartHTTPServer listener bug fix

This commit is contained in:
Jae Kwon
2015-04-23 18:33:20 -07:00
parent 66ff985cd2
commit d9bfe82d93
6 changed files with 17 additions and 19 deletions

View File

@@ -162,11 +162,10 @@ func (n *Node) StartRPC() {
core.SetSwitch(n.sw)
listenAddr := config.App().GetString("RPC.HTTP.ListenAddr")
listener := p2p.NewDefaultListener("tcp", listenAddr, false)
mux := http.NewServeMux()
rpc.RegisterEventsHandler(mux, n.evsw)
rpc.RegisterRPCFuncs(mux, core.Routes)
rpc.StartHTTPServer(listener, mux)
rpc.StartHTTPServer(listenAddr, mux)
}
func (n *Node) Switch() *p2p.Switch {