File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ package main
1919
2020import (
2121 "encoding/json"
22- "fmt"
2322 "strconv"
2423 "strings"
2524 "sync"
@@ -178,9 +177,10 @@ func discoverLoop() {
178177func updateSerialPortList () {
179178 ports , err := enumerateSerialPorts ()
180179 if err != nil {
181- // REPORT
182- fmt .Println ("GET SERIAL LIST ERROR:" , err )
183- return
180+ // TODO: report error?
181+
182+ // Empty port list if they can not be detected
183+ ports = []OsSerialPort {}
184184 }
185185 list := spListDual (ports )
186186 serialPorts .Mu .Lock ()
@@ -191,9 +191,10 @@ func updateSerialPortList() {
191191func updateNetworkPortList () {
192192 ports , err := enumerateNetworkPorts ()
193193 if err != nil {
194- // REPORT
195- fmt .Println ("GET NETWORK LIST ERROR:" , err )
196- return
194+ // TODO: report error?
195+
196+ // Empty port list if they can not be detected
197+ ports = []OsSerialPort {}
197198 }
198199 list := spListDual (ports )
199200 networkPorts .Mu .Lock ()
You can’t perform that action at this time.
0 commit comments