mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
Add read header timeout
This commit is contained in:
parent
ec6b09240e
commit
5fcd45eaf3
1 changed files with 4 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue