We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c79126d commit c5769d7Copy full SHA for c5769d7
command/device/listfqbn.go
@@ -22,6 +22,7 @@ import (
22
"fmt"
23
"io/ioutil"
24
"net/http"
25
+ "time"
26
)
27
28
const (
@@ -56,7 +57,8 @@ type FQBNInfo struct {
56
57
58
// ListFQBN command returns a list of the supported FQBN.
59
func ListFQBN() ([]FQBNInfo, error) {
- resp, err := http.Get("https://builder.arduino.cc/v3/boards/")
60
+ h := &http.Client{Timeout: time.Second * 5}
61
+ resp, err := h.Get("https://builder.arduino.cc/v3/boards/")
62
if err != nil {
63
return nil, fmt.Errorf("cannot retrieve boards from builder.arduino.cc: %w", err)
64
}
0 commit comments