Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
Add default timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyaglow committed Aug 10, 2018
1 parent 0a52142 commit 77164a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cortex.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/http"
"net/url"
"strings"
"time"
)

const (
Expand Down Expand Up @@ -61,7 +62,9 @@ func NewClient(baseurl string, opts *ClientOpts) (*Client, error) {
}

c := &Client{
Client: http.DefaultClient,
Client: &http.Client{
Timeout: time.Minute * 5,
},
BaseURL: u,
UserAgent: userAgent,
Opts: opts,
Expand Down

0 comments on commit 77164a1

Please sign in to comment.