Add read header timeout

This commit is contained in:
Jerry 2023-09-14 19:41:20 -07:00
parent ec6b09240e
commit 5fcd45eaf3

View file

@ -11,6 +11,7 @@ import (
"path/filepath"
"strings"
"syscall"
"time"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/crypto"
@ -262,6 +263,7 @@ func (b *BootnodeCommand) Run(args []string) int {
promServer := &http.Server{
Addr: b.prometheusAddr,
Handler: prometheusMux,
ReadHeaderTimeout: 30 * time.Second,
}
go func() {