smux: adjust read after close behavior

parent 90aa3408
......@@ -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()
......
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