Fix locks on Reader.SetReadahead
This commit is contained in:
parent
b6cd456779
commit
4c3fffa097
|
@ -34,8 +34,11 @@ func (r *Reader) SetResponsive() {
|
|||
// 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) {
|
||||
|
|
Loading…
Reference in New Issue