Add tests for endpoint NewStream.

Rename OpenWithVidPid to OpenWithVIDPID.
This commit is contained in:
Sebastian Zagrodzki
2017-04-29 12:57:55 +02:00
parent 58c1e6ddb4
commit 730c32b9fd
9 changed files with 239 additions and 141 deletions

View File

@@ -120,6 +120,9 @@ func (r ReadStream) Read(p []byte) (int, error) {
// was encountered earlier.
// Close cannot be called concurrently with Read.
func (r ReadStream) Close() error {
if r.s.transfers == nil {
return nil
}
r.s.setDelayedErr(io.EOF)
return nil
}