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"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/cmd/utils"
|
"github.com/ethereum/go-ethereum/cmd/utils"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
|
|
@ -262,6 +263,7 @@ func (b *BootnodeCommand) Run(args []string) int {
|
||||||
promServer := &http.Server{
|
promServer := &http.Server{
|
||||||
Addr: b.prometheusAddr,
|
Addr: b.prometheusAddr,
|
||||||
Handler: prometheusMux,
|
Handler: prometheusMux,
|
||||||
|
ReadHeaderTimeout: 30 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue