Skip to content

Commit 1211767

Browse files
author
Harald Krämer
committed
fix: set timout of 10 seconds for http requests
1 parent fec88bd commit 1211767

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/provider/provider.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"context"
88
"net/http"
99
"os"
10+
"time"
1011

1112
"github.com/Serviceware/terraform-provider-swp/internal/aipe"
1213
"github.com/Serviceware/terraform-provider-swp/internal/authenticator"
@@ -72,7 +73,9 @@ func (p *AIPEProvider) Configure(ctx context.Context, req provider.ConfigureRequ
7273
return
7374
}
7475

75-
client := http.DefaultClient
76+
client := &http.Client{
77+
Timeout: 10 * time.Second,
78+
}
7679

7780
applicationUsername := os.Getenv("SWP_APPLICATION_USER_USERNAME")
7881
applicationPassword := os.Getenv("SWP_APPLICATION_USER_PASSWORD")

0 commit comments

Comments
 (0)