@@ -357,7 +357,9 @@ func (n *Node) startHTTP(endpoint string, apis []rpc.API, modules []string, cors
357357 if err != nil {
358358 return err
359359 }
360- n .log .Info ("HTTP endpoint opened" , "url" , fmt .Sprintf ("http://%s" , endpoint ), "cors" , strings .Join (cors , "," ), "vhosts" , strings .Join (vhosts , "," ))
360+ n .log .Info ("HTTP endpoint opened" , "url" , fmt .Sprintf ("http://%v/" , listener .Addr ()),
361+ "cors" , strings .Join (cors , "," ),
362+ "vhosts" , strings .Join (vhosts , "," ))
361363 // All listeners booted successfully
362364 n .httpEndpoint = endpoint
363365 n .httpListener = listener
@@ -369,10 +371,10 @@ func (n *Node) startHTTP(endpoint string, apis []rpc.API, modules []string, cors
369371// stopHTTP terminates the HTTP RPC endpoint.
370372func (n * Node ) stopHTTP () {
371373 if n .httpListener != nil {
374+ url := fmt .Sprintf ("http://%v/" , n .httpListener .Addr ())
372375 n .httpListener .Close ()
373376 n .httpListener = nil
374-
375- n .log .Info ("HTTP endpoint closed" , "url" , fmt .Sprintf ("http://%s" , n .httpEndpoint ))
377+ n .log .Info ("HTTP endpoint closed" , "url" , url )
376378 }
377379 if n .httpHandler != nil {
378380 n .httpHandler .Stop ()
0 commit comments