chore: bump go to 1.18 (#9147)

This commit is contained in:
Callum Waters
2022-08-01 16:45:25 +02:00
committed by GitHub
parent 5305fa79cf
commit 1e9d81fb8a
18 changed files with 253 additions and 1573 deletions

View File

@@ -69,6 +69,8 @@ type DBContext struct {
// DBProvider takes a DBContext and returns an instantiated DB.
type DBProvider func(*DBContext) (dbm.DB, error)
const readHeaderTimeout = 10 * time.Second
// DefaultDBProvider returns a database using the DBBackend and DBDir
// specified in the ctx.Config.
func DefaultDBProvider(ctx *DBContext) (dbm.DB, error) {
@@ -1220,6 +1222,7 @@ func (n *Node) startPrometheusServer(addr string) *http.Server {
promhttp.HandlerOpts{MaxRequestsInFlight: n.config.Instrumentation.MaxOpenConnections},
),
),
ReadHeaderTimeout: readHeaderTimeout,
}
go func() {
if err := srv.ListenAndServe(); err != http.ErrServerClosed {