Commit 0beff4bb authored by verokarhu's avatar verokarhu

return the read bytes when EOF is reached

parent 8382c797
......@@ -23,6 +23,9 @@ func (ss *SizeSplitter) Split(r io.Reader) chan []byte {
nread, err := r.Read(chunk)
if err != nil {
if err == io.EOF {
if nread > 0 {
out <- chunk[:nread]
}
return
}
u.PErr("block split error: %v\n", err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment