Skip to content

Commit 7bc8a2f

Browse files
committed
Don't try to open two times
1 parent e90a342 commit 7bc8a2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unor4wifi-reboot/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ func reboot_unor4() error {
4949
fmt.Printf("No board connected\n")
5050
return errors.New("No board connected")
5151
}
52+
} else {
53+
d, _ = info[0].Open()
5254
}
53-
d, _ = info[0].Open()
5455

5556
// Reboot
5657
b[0] = 0

0 commit comments

Comments
 (0)