Move promhttp above manet.Listen

This commit is contained in:
Nate Walck 2020-02-23 17:54:49 -05:00
parent 6df2cf552a
commit cff1fcfe9d

View File

@ -46,13 +46,13 @@ func serveRPC(a api.FullNode, stop node.StopFunc, addr multiaddr.Multiaddr) erro
http.Handle("/rest/v0/import", importAH)
http.Handle("/metrics", promhttp.Handler())
lst, err := manet.Listen(addr)
if err != nil {
return xerrors.Errorf("could not listen: %w", err)
}
http.Handle("/metrics", promhttp.Handler())
srv := &http.Server{Handler: http.DefaultServeMux}
sigChan := make(chan os.Signal, 2)