diff --git a/transport/ray/direct.go b/transport/ray/direct.go index 5daa0379..073f6df2 100644 --- a/transport/ray/direct.go +++ b/transport/ray/direct.go @@ -88,6 +88,10 @@ func (v *Stream) ReadTimeout(timeout time.Duration) (*buf.Buffer, error) { case b := <-v.buffer: return b, nil default: + if timeout == 0 { + return nil, ErrReadTimeout + } + select { case <-v.ctx.Done(): return nil, io.ErrClosedPipe