We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 726758f commit 38f70e9Copy full SHA for 38f70e9
serialport.go
@@ -47,9 +47,6 @@ type serport struct {
47
48
isClosingDueToError bool
49
50
- // counter incremented on queue, decremented on write
51
- itemsInBuffer int
52
-
53
// buffered channel containing up to 25600 outbound messages.
54
sendBuffered chan string
55
@@ -224,10 +221,6 @@ func (p *serport) writerNoBuf() {
224
221
// if we get here, we were able to write successfully
225
222
// to the serial port because it blocks until it can write
226
223
227
- // decrement counter
228
- p.itemsInBuffer--
229
- log.Printf("itemsInBuffer:%v\n", p.itemsInBuffer)
230
231
// FINALLY, OF ALL THE CODE IN THIS PROJECT
232
// WE TRULY/FINALLY GET TO WRITE TO THE SERIAL PORT!
233
n2, err := p.portIo.Write(data)
0 commit comments