File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ package main
19
19
20
20
import (
21
21
"encoding/json"
22
- "fmt"
23
22
"strconv"
24
23
"strings"
25
24
"sync"
@@ -178,9 +177,10 @@ func discoverLoop() {
178
177
func updateSerialPortList () {
179
178
ports , err := enumerateSerialPorts ()
180
179
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 {}
184
184
}
185
185
list := spListDual (ports )
186
186
serialPorts .Mu .Lock ()
@@ -191,9 +191,10 @@ func updateSerialPortList() {
191
191
func updateNetworkPortList () {
192
192
ports , err := enumerateNetworkPorts ()
193
193
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 {}
197
198
}
198
199
list := spListDual (ports )
199
200
networkPorts .Mu .Lock ()
You can’t perform that action at this time.
0 commit comments