Skip to content

Commit

Permalink
Add read header timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Sep 15, 2023
1 parent fb8aedd commit d9a1ab3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/cli/bootnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"path/filepath"
"strings"
"syscall"
"time"

"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/crypto"
Expand Down Expand Up @@ -260,8 +261,9 @@ func (b *BootnodeCommand) Run(args []string) int {
prometheusMux.Handle("/debug/metrics/prometheus", prometheus.Handler(metrics.DefaultRegistry))

promServer := &http.Server{
Addr: b.prometheusAddr,
Handler: prometheusMux,
Addr: b.prometheusAddr,
Handler: prometheusMux,
ReadHeaderTimeout: 30 * time.Second,
}

go func() {
Expand Down

0 comments on commit d9a1ab3

Please sign in to comment.