Skip to content

Commit

Permalink
Add http client timeout to 5 secode
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudingcity committed Mar 19, 2020
1 parent b894c3f commit 01a6576
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ func initConfig() {
}

func gitlabClient() *gitlab.Client {
client := &http.Client{Timeout: 1 * time.Second}
client := &http.Client{
Timeout: 5 * time.Second,
}
c := gitlab.NewClient(client, config.Get("token"))
if err := c.SetBaseURL(config.Get("host")); err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 01a6576

Please sign in to comment.