Skip to content

Commit 5ce15ec

Browse files
authored
fix: client timeouts with >250 repositories (#161)
1 parent a91b1ae commit 5ce15ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

github/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ func NewClient(config *Config) (*Client, error) {
6464
}
6565

6666
// A sensible request timeout.
67-
reqTimeout := time.Millisecond * 5000
67+
reqTimeout := time.Millisecond * 10000
6868

6969
// Initialise a new transport instead of using Go's default. This transport
7070
// has explicit timeouts and sensible defaults for max connections per host
7171
// (i.e. their zero values—unlimited—since the plugin typically only deals
7272
// with one host).
7373
transport := &http.Transport{
7474
DialContext: (&net.Dialer{
75-
Timeout: reqTimeout / 2,
75+
Timeout: reqTimeout / 4,
7676
}).DialContext,
77-
TLSHandshakeTimeout: reqTimeout / 2,
77+
TLSHandshakeTimeout: reqTimeout / 4,
7878
Proxy: http.ProxyFromEnvironment,
7979
}
8080

0 commit comments

Comments
 (0)