@@ -21,6 +21,8 @@ import (
2121 "github.com/offchainlabs/nitro/util/signature"
2222)
2323
24+ const DefaultExecKeepAliveInterval = time .Minute
25+
2426type ClientConfig struct {
2527 URL string `json:"url,omitempty" koanf:"url"`
2628 JWTSecret string `json:"jwtsecret,omitempty" koanf:"jwtsecret"`
@@ -59,7 +61,7 @@ var TestClientConfig = ClientConfig{
5961 URL : "self" ,
6062 JWTSecret : "" ,
6163 WebsocketMessageSizeLimit : 256 * 1024 * 1024 ,
62- ExecKeepAliveInterval : time . Minute ,
64+ ExecKeepAliveInterval : DefaultExecKeepAliveInterval ,
6365}
6466
6567var DefaultClientConfig = ClientConfig {
@@ -70,7 +72,7 @@ var DefaultClientConfig = ClientConfig{
7072 RetryErrors : "websocket: close.*|dial tcp .*|.*i/o timeout|.*connection reset by peer|.*connection refused" ,
7173 ArgLogLimit : 2048 ,
7274 WebsocketMessageSizeLimit : 256 * 1024 * 1024 ,
73- ExecKeepAliveInterval : time . Minute ,
75+ ExecKeepAliveInterval : DefaultExecKeepAliveInterval ,
7476}
7577
7678func RPCClientAddOptions (prefix string , f * pflag.FlagSet , defaultConfig * ClientConfig ) {
@@ -107,7 +109,7 @@ func (c *RpcClient) Timeout() time.Duration {
107109func (c * RpcClient ) ExecKeepAliveInterval () time.Duration {
108110 interval := c .config ().ExecKeepAliveInterval
109111 if interval == 0 {
110- return time . Minute
112+ return DefaultExecKeepAliveInterval
111113 }
112114 return interval
113115}
0 commit comments