Commit f0fd9fdb authored by Jacob Vosmaer's avatar Jacob Vosmaer

Prevent callers from recognizing read errors

parent 5e76a4dc
package helper
import (
"fmt"
"io"
"io/ioutil"
"os"
......@@ -35,6 +36,9 @@ func (r *busyReader) Read(p []byte) (int, error) {
n, err := r.Reader.Read(p)
if err != nil {
if err != io.EOF {
err = fmt.Errorf("busyReader: %v", err)
}
r.setError(err)
}
return 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