Skip to content

Commit 97243f3

Browse files
authored
geth retesteth: increase retesteth default http timeouts (#20767)
1 parent 241b283 commit 97243f3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/geth/retesteth.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,13 @@ func retesteth(ctx *cli.Context) error {
889889
cors := splitAndTrim(ctx.GlobalString(utils.RPCCORSDomainFlag.Name))
890890

891891
// start http server
892+
var RetestethHTTPTimeouts = rpc.HTTPTimeouts{
893+
ReadTimeout: 120 * time.Second,
894+
WriteTimeout: 120 * time.Second,
895+
IdleTimeout: 120 * time.Second,
896+
}
892897
httpEndpoint := fmt.Sprintf("%s:%d", ctx.GlobalString(utils.RPCListenAddrFlag.Name), ctx.Int(rpcPortFlag.Name))
893-
listener, _, err := rpc.StartHTTPEndpoint(httpEndpoint, rpcAPI, []string{"test", "eth", "debug", "web3"}, cors, vhosts, rpc.DefaultHTTPTimeouts)
898+
listener, _, err := rpc.StartHTTPEndpoint(httpEndpoint, rpcAPI, []string{"test", "eth", "debug", "web3"}, cors, vhosts, RetestethHTTPTimeouts)
894899
if err != nil {
895900
utils.Fatalf("Could not start RPC api: %v", err)
896901
}

0 commit comments

Comments
 (0)