File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,6 @@ return NewClientWithConfig({{#lambda.titlecase}}{{#lambda.camelcase}}{{client}}{
4242 DefaultHeader: make(map[string]string),
4343 UserAgent: getUserAgent(),
4444 Requester: transport.NewDefaultRequester(nil),
45- ReadTimeout: {{#x-timeouts.server.read} }{ {{.} }}{ {/x-timeouts.server.read} } * time.Millisecond,
46- ConnectTimeout: { {#x-timeouts.server.connect} }{ {{.} }}{ {/x-timeouts.server.connect} } * time.Millisecond,
47- WriteTimeout: { {#x-timeouts.server.write} }{ {{.} }}{ {/x-timeouts.server.write} } * time.Millisecond,
4845 } ,{ {#hasRegionalHost} }
4946 Region: region,{ {/hasRegionalHost} }
5047 })
@@ -67,6 +64,15 @@ func NewClientWithConfig(cfg {{#lambda.titlecase}}{{#lambda.camelcase}}{{client}
6764 if cfg.UserAgent == "" {
6865 cfg.UserAgent = getUserAgent()
6966 }
67+ if cfg.ReadTimeout == 0 {
68+ cfg.ReadTimeout = {{#x-timeouts.server.read} }{ {{.} }}{ {/x-timeouts.server.read} } * time.Millisecond
69+ }
70+ if cfg.ConnectTimeout == 0 {
71+ cfg.ConnectTimeout = {{#x-timeouts.server.connect} }{ {{.} }}{ {/x-timeouts.server.connect} } * time.Millisecond
72+ }
73+ if cfg.WriteTimeout == 0 {
74+ cfg.WriteTimeout = {{#x-timeouts.server.write} }{ {{.} }}{ {/x-timeouts.server.write} } * time.Millisecond
75+ }
7076
7177 return &APIClient{
7278 appID: cfg.AppID,
You can’t perform that action at this time.
0 commit comments