Close returns error, to satisfy the io.Closer interface.
This commit is contained in:
@@ -119,8 +119,9 @@ func (r ReadStream) Read(p []byte) (int, error) {
|
|||||||
// in progress before returning an io.EOF error, unless another error
|
// in progress before returning an io.EOF error, unless another error
|
||||||
// was encountered earlier.
|
// was encountered earlier.
|
||||||
// Close cannot be called concurrently with Read.
|
// Close cannot be called concurrently with Read.
|
||||||
func (r ReadStream) Close() {
|
func (r ReadStream) Close() error {
|
||||||
r.s.setDelayedErr(io.EOF)
|
r.s.setDelayedErr(io.EOF)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteStream is a buffer that will send data asynchronously, reducing
|
// WriteStream is a buffer that will send data asynchronously, reducing
|
||||||
|
Reference in New Issue
Block a user