reader.go | 5 ++++- diff --git a/reader.go b/reader.go index 4689bc64e563d3babea39a0e27e6f730fcabe638..1b3815f3bdc6a77fa8330f09131131316eda3e11 100644 --- a/reader.go +++ b/reader.go @@ -34,8 +34,11 @@ // Configure the number of bytes ahead of a read that should also be // prioritized in preparation for further reads. func (r *Reader) SetReadahead(readahead int64) { r.mu.Lock() - defer r.mu.Unlock() r.readahead = readahead + r.mu.Unlock() + r.t.cl.mu.Lock() + defer r.t.cl.mu.Unlock() + r.tickleClient() } func (r *Reader) readable(off int64) (ret bool) {