We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b717430 commit eae0887Copy full SHA for eae0887
serialport.go
@@ -20,6 +20,7 @@ import (
20
"encoding/base64"
21
"io"
22
"strconv"
23
+ "sync"
24
"sync/atomic"
25
"time"
26
"unicode/utf8"
@@ -273,7 +274,11 @@ func (p *serport) writerRaw() {
273
274
h.broadcastSys <- []byte(msgstr)
275
}
276
277
+var spHandlerLock sync.Mutex
278
+
279
func spHandlerOpen(portname string, baud int, buftype string) {
280
+ spHandlerLock.Lock()
281
+ defer spHandlerLock.Unlock()
282
283
log.Print("Inside spHandler")
284
0 commit comments