Merge pull request #48 from gbarr/large-packet-read
Avoid read channel corruption when response size > bufferSize
This commit is contained in:
commit
ccb6f4a24f
@ -104,6 +104,7 @@ ReadLoop:
|
||||
}
|
||||
if len(leftdata) > 0 { // some data left for processing
|
||||
data = append(leftdata, data...)
|
||||
leftdata = nil
|
||||
}
|
||||
for {
|
||||
l := len(data)
|
||||
|
@ -5,7 +5,7 @@ const (
|
||||
// queue size
|
||||
queueSize = 8
|
||||
// read buffer size
|
||||
bufferSize = 1024
|
||||
bufferSize = 8192
|
||||
// min packet length
|
||||
minPacketLength = 12
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user