1
0
Fork 0

Add 10 second timeout for sysdump GETs

master
Philip O'Toole 3 years ago
parent 2fd1a84f55
commit 37c5e4532d

@ -13,6 +13,7 @@ import (
"os"
"sort"
"strings"
"time"
"github.com/Bowery/prompt"
"github.com/mkideal/cli"
@ -429,10 +430,13 @@ func cliJSON(ctx *cli.Context, cmd, line, url string, argv *argT) error {
}
func urlsToWriter(urls []string, w io.Writer, argv *argT) error {
client := http.Client{Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: argv.Insecure},
Proxy: http.ProxyFromEnvironment,
}}
client := http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: argv.Insecure},
Proxy: http.ProxyFromEnvironment,
},
Timeout: 10 * time.Second,
}
for i := range urls {
err := func() error {

Loading…
Cancel
Save