Update node/node.go

This commit is contained in:
Martin Holst Swende 2020-03-23 09:26:56 +01:00 committed by GitHub
parent 2aefb28b36
commit f033c8d3ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -382,7 +382,7 @@ func (n *Node) startHTTP(endpoint string, apis []rpc.API, modules []string, cors
// stopHTTP terminates the HTTP RPC endpoint. // stopHTTP terminates the HTTP RPC endpoint.
func (n *Node) stopHTTP() { func (n *Node) stopHTTP() {
if n.httpListener != nil { if n.httpListener != nil {
url := fmt.Sprintf("http://%v", n.httpListener.Addr()) url := fmt.Sprintf("http://%v/", n.httpListener.Addr())
n.httpListener.Close() n.httpListener.Close()
n.httpListener = nil n.httpListener = nil
n.log.Info("HTTP endpoint closed", "url", url) n.log.Info("HTTP endpoint closed", "url", url)