geth retesteth: increase retesteth default http timeouts (#20767)

This commit is contained in:
winsvega 2020-03-16 12:33:32 +03:00 committed by GitHub
parent 241b283690
commit 97243f3a76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -889,8 +889,13 @@ func retesteth(ctx *cli.Context) error {
cors := splitAndTrim(ctx.GlobalString(utils.RPCCORSDomainFlag.Name))
// start http server
var RetestethHTTPTimeouts = rpc.HTTPTimeouts{
ReadTimeout: 120 * time.Second,
WriteTimeout: 120 * time.Second,
IdleTimeout: 120 * time.Second,
}
httpEndpoint := fmt.Sprintf("%s:%d", ctx.GlobalString(utils.RPCListenAddrFlag.Name), ctx.Int(rpcPortFlag.Name))
listener, _, err := rpc.StartHTTPEndpoint(httpEndpoint, rpcAPI, []string{"test", "eth", "debug", "web3"}, cors, vhosts, rpc.DefaultHTTPTimeouts)
listener, _, err := rpc.StartHTTPEndpoint(httpEndpoint, rpcAPI, []string{"test", "eth", "debug", "web3"}, cors, vhosts, RetestethHTTPTimeouts)
if err != nil {
utils.Fatalf("Could not start RPC api: %v", err)
}