Move promhttp above manet.Listen
This commit is contained in:
parent
6df2cf552a
commit
cff1fcfe9d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user