Skip to content

Commit

Permalink
Merge pull request #278 from Arvintian/main
Browse files Browse the repository at this point in the history
fix http executor set timeout
  • Loading branch information
yottahmd authored Aug 18, 2022
2 parents 36e464c + e00dc42 commit d2d346b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/executor/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func CreateHTTPExecutor(ctx context.Context, step *dag.Step) (Executor, error) {
ctx, cancel := context.WithCancel(ctx)
client := resty.New()
if reqCfg.Timeout > 0 {
client.SetTimeout(time.Duration(reqCfg.Timeout))
client.SetTimeout(time.Second * time.Duration(reqCfg.Timeout))
}
req := client.R().SetContext(ctx)
if len(reqCfg.Headers) > 0 {
Expand Down

0 comments on commit d2d346b

Please sign in to comment.