Skip to content

Commit c7603f5

Browse files
committed
Add timeout
1 parent c5ce6e5 commit c7603f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arduino/cli/commander.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"fmt"
2424
"os"
2525
"path/filepath"
26+
"time"
2627

2728
"github.com/arduino/arduino-cli/cli/instance"
2829
"github.com/arduino/arduino-cli/commands/board"
@@ -71,6 +72,7 @@ func NewCommander() (arduino.Commander, error) {
7172
func (c *commander) BoardList() ([]*rpc.DetectedPort, error) {
7273
req := &rpc.BoardListRequest{
7374
Instance: c.Instance,
75+
Timeout: time.Second.Milliseconds(),
7476
}
7577
ports, err := board.List(req)
7678
if err != nil {

0 commit comments

Comments
 (0)