File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,6 @@ func (p *serport) reader() {
77
77
serialBuffer := make ([]byte , 1024 )
78
78
for {
79
79
n , err := p .portIo .Read (serialBuffer )
80
- bufferPart := serialBuffer [:n ]
81
80
82
81
//if we detect that port is closing, break out of this for{} loop.
83
82
if p .isClosing {
@@ -90,8 +89,8 @@ func (p *serport) reader() {
90
89
// read can return legitimate bytes as well as an error
91
90
// so process the n bytes red, if n > 0
92
91
if n > 0 && err == nil {
93
- log .Print ("Read " + strconv .Itoa (n ) + " bytes ch: " + string (bufferPart [:n ]))
94
- p .bufferFlow .OnIncomingData (string (bufferPart [:n ]))
92
+ log .Print ("Read " + strconv .Itoa (n ) + " bytes ch: " + string (serialBuffer [:n ]))
93
+ p .bufferFlow .OnIncomingData (string (serialBuffer [:n ]))
95
94
}
96
95
97
96
// double check that we got characters in the buffer
You can’t perform that action at this time.
0 commit comments