Skip to content

Commit

Permalink
adjust read after close behavior #23
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Jul 1, 2017
1 parent 2de5471 commit ebec7ef
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ func (s *Stream) Read(b []byte) (n int, err error) {
}

READ:
select {
case <-s.die:
return 0, errors.New(errBrokenPipe)
case <-deadline:
return n, errTimeout
default:
}

s.bufferLock.Lock()
n, err = s.buffer.Read(b)
s.bufferLock.Unlock()
Expand Down

0 comments on commit ebec7ef

Please sign in to comment.